1.lf 1 stdin 2.TH LDAP_RENAME 3 "2020/04/28" "OpenLDAP 2.4.50" 3.\" $OpenLDAP$ 4.\" Copyright 1998-2020 The OpenLDAP Foundation All Rights Reserved. 5.\" Copying restrictions apply. See COPYRIGHT/LICENSE. 6.SH NAME 7ldap_rename, ldap_rename_s \- Renames the specified entry. 8.SH LIBRARY 9OpenLDAP LDAP (libldap, \-lldap) 10.SH SYNOPSIS 11.nf 12.ft B 13#include <ldap.h> 14.LP 15.ft B 16int ldap_rename( ld, dn, newrdn, newparent, deleteoldrdn, sctrls[], cctrls[], msgidp ); 17.ft 18LDAP *ld; 19const char *dn, *newrdn, *newparent; 20int deleteoldrdn; 21LDAPControl *sctrls[], *cctrls[]; 22int *msgidp); 23.LP 24.ft B 25int ldap_rename_s( ld, dn, newrdn, newparent, deleteoldrdn, sctrls[], cctrls[] ); 26.ft 27LDAP *ld; 28const char *dn, *newrdn, *newparent; 29int deleteoldrdn; 30LDAPControl *sctrls[], *cctrls[]; 31.SH DESCRIPTION 32These routines are used to perform a LDAP rename operation. 33The function changes the leaf component of an entry's distinguished 34name and optionally moves the entry to a new parent container. The 35.B ldap_rename_s 36performs a rename operation synchronously. 37The method takes \fIdn\fP, which points to the distinguished name of 38the entry whose attribute is being compared, \fInewparent\fP,the distinguished 39name of the entry's new parent. If this parameter is NULL, only the RDN is changed. 40The root DN is specified by passing a zero length string, "". 41\fIdeleteoldrdn\fP specifies whether the old RDN should be retained or deleted. 42Zero indicates that the old RDN should be retained. If you choose this option, 43the attribute will contain both names (the old and the new). 44Non-zero indicates that the old RDN should be deleted. 45\fIserverctrls\fP points to an array of LDAPControl structures that list the 46client controls to use with this extended operation. Use NULL to specify 47no client controls. \fIclientctrls\fP points to an array of LDAPControl 48structures that list the client controls to use with the search. 49.LP 50.B ldap_rename 51works just like 52.B ldap_rename_s, 53but the operation is asynchronous. It returns the message id of the request 54it initiated. The result of this operation can be obtained by calling 55.BR ldap_result(3). 56.SH ERRORS 57.B ldap_rename() 58returns \-1 in case of error initiating the request, and 59will set the \fIld_errno\fP field in the \fIld\fP parameter to 60indicate the error. 61.BR ldap_rename_s() 62returns the LDAP error code resulting from the rename operation. 63.SH SEE ALSO 64.BR ldap (3), 65.BR ldap_modify (3) 66.SH ACKNOWLEDGEMENTS 67.lf 1 ./../Project 68.\" Shared Project Acknowledgement Text 69.B "OpenLDAP Software" 70is developed and maintained by The OpenLDAP Project <http://www.openldap.org/>. 71.B "OpenLDAP Software" 72is derived from the University of Michigan LDAP 3.3 Release. 73.lf 67 stdin 74