summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
3281c6e)
Exim documented behaviour is that the single-request case controls
the output format (by not labelling attributes with names).
The code is broken for the case where attrs B, C are derived from A
and A is requested (and the LDAP server used isn't buggy here; some
are and only return A rather than A, B, C).
DEBUG(D_lookup) debug_printf("LDAP attr loop %s:%s\n", attr, value);
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
data = string_cat(data, &size, &ptr, US",", 1);
/* For multiple attributes, the data is in quotes. We must escape