Re: [exim-dev] LDAP multiline attribute oddity

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Graeme Fowler
Date:  
À: exim-dev
Sujet: Re: [exim-dev] LDAP multiline attribute oddity
Just keeping this ticking over, working against branch exim-4_86+fixes I'm finding that the code in lookups/ldap.c from line 755 onwards is where it's going wrong. Having put a cluster of additional debug statements in I'm seeing an attribute value of NULL for affected lookups here:

    /* Otherwise, loop through the entry, grabbing attribute values. If there's
    only one attribute being retrieved, no attribute name is given, and the
    result is not quoted. Multiple values are separated by (comma, space).
    If more than one attribute is being retrieved, the data is given as a
    sequence of name=value pairs, with the value always in quotes. If there are
    multiple values, they are given within the quotes, comma separated. */


    else for (attr = US ldap_first_attribute(lcp->ld, e, &ber);
              attr != NULL;
              attr = US ldap_next_attribute(lcp->ld, e, ber))
      {
      if (attr[0] != 0)
        {
        /* Get array of values for this attribute. */


        if ((firstval = values = USS ldap_get_values(lcp->ld, e, CS attr))
             != NULL)
          {


It's finding the attribute name (msExchSafeSendersHash, for example) but the check of "ldap_get_values(lcp->ld, e, CS attr)" for affected accounts returns NULL.

I'm beginning to think that means the problem itself is up the code from here...

Graeme