1ldap_modrdn(3LDAP) LDAP Library Functions ldap_modrdn(3LDAP)
2
3
4
6 ldap_modrdn, ldap_modrdn_s, ldap_modrdn2, ldap_modrdn2_s, ldap_rename,
7 ldap_rename_s - modify LDAP entry RDN
8
10 cc[ flag... ] file...-l ldap [ library... ]
11 #include <lber.h>
12 #include <ldap.h>
13
14 int ldap_modrdn(LDAP *ld, const char *dn, const char *newrdn);
15
16
17 int ldap_modrdn_s(LDAP *ld, const char *dn, const char *newrdn,
18 int deleteoldrdn);
19
20
21 int ldap_modrdn2(LDAP *ld, const char *dn, const char *newrdn,
22 int deleteoldrdn);
23
24
25 int ldap_modrdn2_s(LDAP *ld, const char *dn,
26 const char *newrdn, int deleteoldrdn);
27
28
29 int ldap_rename(LDAP *ld, const char *dn, const char *newrdn,
30 const char *newparent, int deleteoldrdn,
31 LDAPControl **serverctrls, LDAPControl **clientctrls,
32 int *msgidp);
33
34
35 int ldap_rename_s(LDAP *ld, const char *dn, const char *newrdn,
36 const char *newparent, const int deleteoldrdn,
37 LDAPControl **serverctrls,LDAPControl **clientctrls);
38
39
41 The ldap_modrdn() and ldap_modrdn_s() functions perform an LDAP modify
42 RDN (Relative Distinguished Name) operation. They both take dn, the DN
43 (Distinguished Name) of the entry whose RDN is to be changed, and
44 newrdn, the new RDN, to give the entry. The old RDN of the entry is
45 never kept as an attribute of the entry. ldap_modrdn() is asynchronous.
46 It return the message id of the operation it initiates. ldap_modrdn_s()
47 is synchronous. It returns the LDAP error code that indicates the suc‐
48 cess or failure of the operation.
49
50
51 The ldap_modrdn2() and ldap_modrdn2_s() functions also perform an LDAP
52 modify RDN operation. They take the same parameters as above. In addi‐
53 tion, they both take the deleteoldrdn parameter ,which is used as a
54 boolean value to indicate whether or not the old RDN values should be
55 deleted from the entry.
56
57
58 The ldap_rename(), ldap_rename_s() routines are used to change the
59 name, that is, the RDN of an entry. These routines deprecate the
60 ldap_modrdn() and ldap_modrdn_s() routines, as well as ldap_modrdn2()
61 and ldap_modrdn2_s().
62
63
64 The ldap_rename() and ldap_rename_s() functions both support LDAPv3
65 server controls and client controls.
66
68 The synchronous (_s) versions of these functions return an LDAP error
69 code, either LDAP_SUCCESS or an error. See ldap_error(3LDAP).
70
71
72 The asynchronous versions return −1 in the event of an error, setting
73 the ld_errno field of ld. See ldap_error(3LDAP) for more details. Use
74 ldap_result(3LDAP) to determine a particular unsuccessful result.
75
77 See attributes(5) for a description of the following attributes of the
78 ldap_modrdn(), ldap_modrdn_s(), ldap_modrdn2() and ldap_modrdn2_s()
79 functions:
80
81
82
83
84 ┌─────────────────────────────┬─────────────────────────────┐
85 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
86 ├─────────────────────────────┼─────────────────────────────┤
87 │Availability │SUNWcsl (32-bit) │
88 │ │SUNWcslx (64-bit) │
89 ├─────────────────────────────┼─────────────────────────────┤
90 │Interface Stability │Obsolete │
91 └─────────────────────────────┴─────────────────────────────┘
92
93
94 The ldap_rename() and ldap_rename_s() functions have the following
95 attributes:
96
97
98
99
100 ┌─────────────────────────────┬─────────────────────────────┐
101 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
102 ├─────────────────────────────┼─────────────────────────────┤
103 │Availability │SUNWcsl (32-bit) │
104 │ │SUNWcslx (64-bit) │
105 ├─────────────────────────────┼─────────────────────────────┤
106 │Interface Stability │Evolving │
107 └─────────────────────────────┴─────────────────────────────┘
108
110 ldap(3LDAP), ldap_error(3LDAP) , attributes(5)
111
112
113
114SunOS 5.11 22 Octo 2001 ldap_modrdn(3LDAP)