X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Flookups%2Fldap.c;h=ef7ed9e340040842fb4894d14953edec85bf01c7;hb=9175a8d2ac50382af2045b37e7b054180f91f4e8;hp=f77229ded320ba5b6923f7f916d7d26ee0c0cc89;hpb=d502442ac32f8964f6cf86469869cecb035d12c0;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/lookups/ldap.c b/src/src/lookups/ldap.c index f77229ded..ef7ed9e34 100644 --- a/src/src/lookups/ldap.c +++ b/src/src/lookups/ldap.c @@ -797,7 +797,13 @@ while ((rc = ldap_result(lcp->ld, msgid, 0, timeoutptr, &result)) == DEBUG(D_lookup) debug_printf("LDAP attr loop %s:%s\n", attr, value); - if (values != firstval) + /* In case we requested one attribute only but got + * several times into that attr loop, we need to append + * the additional values. (This may happen if you derive + * attributeTypes B and C from A and then query for A.) + * In all other cases we detect the different attribute + * and append only every non first value. */ + if ((attr_count == 1 && data) || (values != firstval)) data = string_cat(data, &size, &ptr, US",", 1); /* For multiple attributes, the data is in quotes. We must escape