24.29. slapi_entry_dup()

Makes a copy of an entry, its DN, and its attributes.
Description

This function returns a copy of an existing Section 14.22, “Slapi_Entry” structure. You can call other frontend functions to change the DN and attributes of this entry.

Syntax

#include "slapi-plugin.h"
Slapi_Entry *slapi_entry_dup( const Slapi_Entry *e );

Parameters

This function takes the following parameter:

e
Entry that you want to copy.
Returns

This function returns the new copy of the entry. If the structure cannot be duplicated, for example, if no more virtual memory exists, the slapd program terminates.

Memory Concerns

When you are no longer using the entry, free it from memory by calling the slapi_entry_free() function.