Sun Java System Directory Server Enterprise Edition 6.0 Developer's Guide


Builds the new DN of an entry.


#include "slapi-plugin.h"
 char * slapi_moddn_get_newdn(Slapi_DN *dn_olddn, char *newrdn,
    char *newsuperiordn);


This function takes the following parameters:


The old DN value.


The new RDN value.


If not NULL, will be the DN of the future superior entry of the new DN, which will be worked out by adding the value in newrdn in front of the content of this parameter.


This function returns the new DN for the entry whose previous DN was dn_olddn.


This function is used for moddn operations and builds a new DN out of a new RDN and the DN of the new parent.

The new DN is worked out by adding the new RDN in newrdn to a parent DN. The parent will be the value in newsuperiordn, if different from NULL, and will otherwise be taken from dn_olddn by removing the old RDN. (The parent of the entry will still be the same as the new DN).

Memory Concerns

You must free the DN returned using slapi_ch_free_string() .