#include <ldap.h>
int ldap_modify_ext_s( LDAP *ld, const char *dn, LDAPMod **mods,
LDAPControl **serverctrls, LDAPControl **clientctrls );
ld |
Connection handle, which is a pointer to an |
dn | |
mods |
Pointer to a NULL-terminated array of pointers to |
serverctrls |
Pointer to an array of |
clientctrls |
Pointer to an array of |
LDAP_SUCCESS if successful. LDAP_PARAM_ERROR if any of the arguments are invalid. LDAP_ENCODING_ERROR if an error occurred when BER-encoding the request. LDAP_SERVER_DOWN if the LDAP server did not receive the request or if the connection to the server was lost. LDAP_NO_MEMORY if memory cannot be allocated. LDAP_LOCAL_ERROR if an error occurred when receiving the results from the server. LDAP_DECODING_ERROR if an error occurred when decoding the BER-encoded results from the server. LDAP_NOT_SUPPORTED if controls are included in your request (for example, as a session preference) and your LDAP client does not specify that it is using the LDAP v3 protocol. Make sure that you set the version of your LDAP client to version 3 before calling this function. (For details, see "Specifying the LDAP Version of Your Client" on page 54.) LDAP_OPERATIONS_ERROR may be sent by the Netscape Directory Server for general errors encountered by the server when processing the request.LDAP_PROTOCOL_ERROR if the modify request did not comply with the LDAP protocol. The Netscape Directory Server may set this error code in the results for a variety of reasons. Some of these reasons include: LDAP_MOD_ADD, LDAP_MOD_DELETE, and LDAP_MOD_REPLACE) is specified in the request. LDAP_MOD_ADD and no values are specified. LDAP_CONSTRAINT_VIOLATION may be sent by the Netscape Directory Server if your client is attempting to modify the userpassword attribute in the following situations: userpassword attribute is shorter than the minimum length. userpassword attribute is the same as a previous value of that attribute. userpassword attribute is the same as the value of the uid, cn, sn, givenname, ou, or mail attributes. (Using a password that is the same as your user id or email address would make the password trivial and easy to crack.) LDAP_UNWILLING_TO_PERFORM may be sent by the Netscape Directory Server in the following situations:aci attribute and an error occurs. userpassword attribute needs to be changed. (The password has expired.) LDAP_REFERRAL may be sent by the Netscape Directory Server if the DN specified by the dn argument identifies an entry not handled by the current server and if referral URLs identify a different server to handle the entry. (For example, if the DN is uid=bjensen, ou=European Sales, o=Airius.com, all entries under ou=European Sales might be handled by a different Directory Server.) LDAP_NO_SUCH_ATTRIBUTE may be sent by the Netscape Directory Server if the attribute that you want to modify (add, replace, or delete) does not exist. LDAP_INVALID_SYNTAX may be sent by the Netscape Directory Server if your client is modifying the schema DSE and no object class or attribute type is specified. LDAP_NO_SUCH_OBJECT may be sent by the Netscape Directory Server if the entry that you want modified does not exist.LDAP_INSUFFICIENT_ACCESS may be sent by the Netscape Directory Server if the DN that your client is authenticated as does not have the access rights to modify the entry. LDAP_TYPE_OR_VALUE_EXISTS may be sent by the Netscape Directory Server if your client is attempting to add an attribute to an entry and the attribute values already exist in the entry. LDAP_OBJECT_CLASS_VIOLATION may be sent by the Netscape Directory Server if the modified entry does not comply with the Directory Server schema (for example, if one or more required attributes are not specified). LDAP_NOT_ALLOWED_ON_RDN may be sent by the Netscape Directory Server if the modified entry no longer contains attributes for each DN component. ldap_modify_ext_s() modifies an entry in the directory synchronously.
This function is a new version of the ldap_modify_s() function. If you are writing a new LDAP client, you should call this function instead of ldap_modify_s().
To make changes to an entry to the directory, you need to specify the following information:
dn argument to specify the DN of the entry that you want to modify. LDAPMod structure for change that you want to make to an attribute. Create an array of these LDAPMod structures and pass the array as the mods argument.
For information on using the LDAPMod structure to specify a change, see LDAPMod. ldap_modify_ext_s() is a synchronous function, which directly returns the results of the operation. If you want to perform other operations while waiting for the results of this operation, call the asynchronous function ldap_modify_ext() instead. (For more information on asynchronous and synchronous functions, see "Calling Synchronous and Asynchronous Functions" on page 80.)
For more information on modifying entries in the directory, see "Modifying an Entry" on page 188.
ldap_modify_ext(), LDAPMod.
Last Updated: 10/01/98 17:06:23