[Date Prev][Date Next] [Chronological] [Thread] [Top]

ldap_remove() in ldapext-ldap-c-api-01



ldap_remove*() do not provide an interface consistent
with other ldap routines, such as ldap_search*(),
ldap_copy*(), ldap_modify*(), and ldap_delete*().
For the other operations, ldap_op()/ldap_op_s() preforms
a simple operation and ldap_op_ext()/ldap_op_ext_s()
operations that require extended parameters.  For remove,
however, ldap_remove/ldap_remove_s expect "extended"
parameters and there are no simple interface versions.

I believe application programmers should be provided
with both simple and extended versions of every ldap
operation AND that these be named consistently.  I
recommend that:

  ldap_remove() be renamed ldap_remove_ext()
  ldap_remove_s() be renamed ldap_remove_ext_s()

And two new functions be added:
  int ldap_remove(LDAP *ld, char* dn, char* newdn, int deloldrdn);
  int ldap_remove_s(LDAP *ld, char* dn, char* newdn, int deloldrdn);

In terms of implementation, this change has very little impact.
However, application developers will enjoy better consistency
of interface.  Programmers updating RFC1823 code to not
use depreciated functions may simply s/ldap_modrdn/ldap_rename/.

Kurt