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

ldap_first_attribute() not working correctly (ITS#260)

Full_Name: Dirk Nehring
Version: 1.2.6
OS: Solaris 2.6
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (

Hi *,

I have the following program part:

char *get_attr[] = {"maildrop", "userpassword", NULL};
if ((rc = ldap_search_s(ld, ldap_base, LDAP_SCOPE_SUBTREE, filter,
                        get_attr, 0, &result)) != LDAP_SUCCESS) {
if (e = ldap_first_entry(ld, result)) {
	if (a = ldap_first_attribute(ld, e, &ber)) {
	    vals = ldap_get_values(ld, e, a);
        if ((a = ldap_next_attribute(ld, e, ber)) && (!return_error)) {
	    vals = ldap_get_values(ld, e, a);

The first ldap_get_values() gives me the values of "userpassword", the second
call gives
me the values of "maildrop" !?! This seems not to be correct!
Netscape Directory Server 3.1 doesn't handle this in these strange manner.

I haven't found any hints in the docs about the ordering of the attributes when