Go to main content

man pages section 3: Extended Library Functions, Volume 1

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

ldap_rename (3oldap)

Name

ldap_rename - Renames the specified entry.

Synopsis

#include <ldap.h>

int ldap_rename( ld, dn, newrdn, newparent, deleteoldrdn, sctrls[], cctrls[], msgidp );
LDAP *ld;
const char *dn, *newrdn, *newparent;
int deleteoldrdn;
LDAPControl *sctrls[], *cctrls[];
int *msgidp);

int ldap_rename_s( ld, dn, newrdn, newparent, deleteoldrdn, sctrls[], cctrls[] );
LDAP *ld;
const char *dn, *newrdn, *newparent;
int deleteoldrdn;
LDAPControl *sctrls[], *cctrls[];

Description

LDAP_RENAME(3oldap)                                        LDAP_RENAME(3oldap)



NAME
       ldap_rename, ldap_rename_s - Renames the specified entry.

LIBRARY
       OpenLDAP LDAP (libldap, -lldap)

SYNOPSIS
       #include <ldap.h>

       int ldap_rename( ld, dn, newrdn, newparent, deleteoldrdn, sctrls[], cctrls[], msgidp );
       LDAP *ld;
       const char *dn, *newrdn, *newparent;
       int deleteoldrdn;
       LDAPControl *sctrls[], *cctrls[];
       int *msgidp);

       int ldap_rename_s( ld, dn, newrdn, newparent, deleteoldrdn, sctrls[], cctrls[] );
       LDAP *ld;
       const char *dn, *newrdn, *newparent;
       int deleteoldrdn;
       LDAPControl *sctrls[], *cctrls[];

DESCRIPTION
       These  routines are used to perform a LDAP rename operation.  The func-
       tion changes the leaf component of an entry's  distinguished  name  and
       optionally moves the entry to a new parent container. The ldap_rename_s
       performs a rename operation synchronously.  The method takes dn,  which
       points  to the distinguished name of the entry whose attribute is being
       compared, newparent,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, "".  deleteoldrdn  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.  serverctrls points to an
       array  of  LDAPControl  structures that list the client controls to use
       with this extended operation. Use NULL to specify no  client  controls.
       clientctrls  points to an array of LDAPControl structures that list the
       client controls to use with the search.

       ldap_rename works just like ldap_rename_s, but the operation  is  asyn-
       chronous.  It  returns  the message id of the request it initiated. The
       result of this operation can be obtained by calling ldap_result(3).

ERRORS
       ldap_rename() returns -1 in case of error initiating the  request,  and
       will  set the ld_errno field in the ld parameter to indicate the error.
       ldap_rename_s() returns the LDAP error code resulting from  the  rename
       operation.


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +---------------+------------------------------+
       |ATTRIBUTE TYPE |       ATTRIBUTE VALUE        |
       +---------------+------------------------------+
       |Availability   | system/network/ldap/openldap |
       +---------------+------------------------------+
       |Stability      | Pass-through uncommitted     |
       +---------------+------------------------------+

SEE ALSO
       ldap(3), ldap_modify(3)

ACKNOWLEDGEMENTS
       OpenLDAP  Software  is developed and maintained by The OpenLDAP Project
       <http://www.openldap.org/>.  OpenLDAP Software is derived from the Uni-
       versity of Michigan LDAP 3.3 Release.



NOTES
       Source  code  for open source software components in Oracle Solaris can
       be found at https://www.oracle.com/downloads/opensource/solaris-source-
       code-downloads.html.

       This     software     was    built    from    source    available    at
       https://github.com/oracle/solaris-userland.   The  original   community
       source  was downloaded from  ftp://ftp.openldap.org/pub/OpenLDAP/openl-
       dap-release/openldap-2.4.59.tgz.

       Further information about this software can be found on the open source
       community website at http://www.openldap.org/.



OpenLDAP 2.4.59                   2021/06/03               LDAP_RENAME(3oldap)