To modify an entry, the client must have write permissions to the attributes that are being modified.
Create an LDAPMod structure for each attribute that will be modified.
Set the modification operation, type, and value in each structure.
To add a value even when it may already exist, set the operation to LDAP_MOD_REPLACE.
To add a value and report an error if it already exists, set the operation to LDAP_MOD_ADD.
To delete an existing value, set the operation to LDAP_MOD_DELETE.
Add each structure to a NULL-terminated array of LDAPMod structures.
Call ldap_modify_ext_s to modify the specified entry.
For sample code, see modattrs.c.