Synchronously renames the specified entry.
#include <ldap.h>
int ldap_rename_s (
LDAP *ld,
const char *dn,
const char *newrdn,
const char *newparent,
int deleteoldrdn,
LDAPControl **serverctrls,
LDAPControl **clientctrls);
(IN) Points to the handle for the LDAP session.
(IN) Points to the distinguished name of the entry that is being renamed.
(IN) Points to the new relative distinguished name to give the entry.
(IN) Points to the distinguished name of the entry's new parent. If this parameter is NULL, only the RDN is changed. The root DN is specified by passing a zero length string, "".
This function can be used with LDAP v2 servers if the newparent parameter is NULL. LDAP v2 does not allow the entry to be moved to a new parent.
(IN) Specifies whether the old RDN should be retained or deleted.
Zero indicates that the old RDN should be retained. If you choose this option, the attribute will contain both names (the old and the new).
Non-zero indicates that the old RDN should be deleted.
(IN) Points to an array of LDAPControl structures that list the server controls to use with the rename. Use NULL to specify no server controls.
(IN) Points to an array of LDAPControl structures that list the client controls to use with the rename. Use NULL to specify no client controls.
|
0x00 |
LDAP_SUCCESS |
|
Non-zero |
Failure. For a complete list, see |
|
0x53 |
LDAP_ENCODING_ERROR |
|
0x5A |
LDAP_NO_MEMORY |
|
0x5C |
LDAP_NOT_SUPPORTED |
eDirectory does not currently support any server-side controls to use with renaming an entry.
For sample code, see renamerdn.c.