1LDAP_RENAME(3) Library Functions Manual LDAP_RENAME(3)
2
3
4
6 ldap_rename, ldap_rename_s - Renames the specified entry.
7
9 OpenLDAP LDAP (libldap, -lldap)
10
12 #include <ldap.h>
13
14 int ldap_rename( ld, dn, newrdn, newparent, deleteoldrdn, sctrls[], cctrls[], msgidp );
15 LDAP *ld;
16 const char *dn, *newrdn, *newparent;
17 int deleteoldrdn;
18 LDAPControl *sctrls[], *cctrls[];
19 int *msgidp);
20
21 int ldap_rename_s( ld, dn, newrdn, newparent, deleteoldrdn, sctrls[], cctrls[] );
22 LDAP *ld;
23 const char *dn, *newrdn, *newparent;
24 int deleteoldrdn;
25 LDAPControl *sctrls[], *cctrls[];
26
28 These routines are used to perform a LDAP rename operation. The func‐
29 tion changes the leaf component of an entry's distinguished name and
30 optionally moves the entry to a new parent container. The ldap_rename_s
31 performs a rename operation synchronously. The method takes dn, which
32 points to the distinguished name of the entry whose attribute is being
33 compared, newparent,the distinguished name of the entry's new parent.
34 If this parameter is NULL, only the RDN is changed. The root DN is
35 specified by passing a zero length string, "". deleteoldrdn specifies
36 whether the old RDN should be retained or deleted. Zero indicates that
37 the old RDN should be retained. If you choose this option, the attri‐
38 bute will contain both names (the old and the new). Non-zero indicates
39 that the old RDN should be deleted. serverctrls points to an array of
40 LDAPControl structures that list the client controls to use with this
41 extended operation. Use NULL to specify no client controls. clientctrls
42 points to an array of LDAPControl structures that list the client con‐
43 trols to use with the search.
44
45 ldap_rename works just like ldap_rename_s, but the operation is asyn‐
46 chronous. It returns the message id of the request it initiated. The
47 result of this operation can be obtained by calling ldap_result(3).
48
50 ldap_rename() returns -1 in case of error initiating the request, and
51 will set the ld_errno field in the ld parameter to indicate the error.
52 ldap_rename_s() returns the LDAP error code resulting from the rename
53 operation.
54
56 ldap(3), ldap_modify(3)
57
59 OpenLDAP Software is developed and maintained by The OpenLDAP Project
60 <http://www.openldap.org/>. OpenLDAP Software is derived from the Uni‐
61 versity of Michigan LDAP 3.3 Release.
62
63
64
65OpenLDAP 2.6.2 2022/05/04 LDAP_RENAME(3)