- check for "*" when looking up wildcard in LDAP.
- fix couple of edge case parse fails of timeout option.
- add SEARCH_BASE configuration option.
- add random selection as a master map entry option.
- re-read config on HUP signal.
- add LDAP_URI, LDAP_TIMEOUT and LDAP_NETWORK_TIMEOUT configuration
options.
- fix deadlock in submount mount module.
- fix lack of ferror() checking when reading files.
- fix typo in autofs(5) man page.
- fix map entry expansion when undefined macro is present.
- remove unused export validation code.
- add dynamic logging (adapted from v4 patch from Jeff Moyer).
- fix recursive loopback mounts (Matthias Koenig).
- add map re-load to verbose logging.
- fix handling of LDAP base dns with spaces.
- handle MTAB_NOTUPDATED status return from mount.
- when default master map, auto.master, is used also check for auto_master.
- update negative mount timeout handling.
- fix large group handling (Ryan Thomas).
- fix for dynamic logging breaking non-sasl build (Guillaume Rousse).
- eliminate NULL proc ping for singleton host or local mounts.
28 lines
844 B
Diff
28 lines
844 B
Diff
diff --git a/modules/lookup_ldap.c b/modules/lookup_ldap.c
|
|
index dfb3054..8719af9 100644
|
|
--- a/modules/lookup_ldap.c
|
|
+++ b/modules/lookup_ldap.c
|
|
@@ -193,10 +193,11 @@ static int get_query_dn(unsigned logopt, LDAP *ldap, struct lookup_context *ctxt
|
|
LDAPMessage *result = NULL, *e;
|
|
struct ldap_searchdn *sdns = NULL;
|
|
char *attrs[2];
|
|
+ struct berval **value;
|
|
int scope;
|
|
int rv, l;
|
|
|
|
- attrs[0] = LDAP_NO_ATTRS;
|
|
+ attrs[0] = (char *) key;
|
|
attrs[1] = NULL;
|
|
|
|
if (!ctxt->mapname && !ctxt->base) {
|
|
@@ -283,7 +284,8 @@ static int get_query_dn(unsigned logopt, LDAP *ldap, struct lookup_context *ctxt
|
|
}
|
|
|
|
e = ldap_first_entry(ldap, result);
|
|
- if (e) {
|
|
+ if (e && (value = ldap_get_values_len(ldap, e, key))) {
|
|
+ ldap_value_free_len(value);
|
|
dn = ldap_get_dn(ldap, e);
|
|
debug(logopt, MODPREFIX "found query dn %s", dn);
|
|
} else {
|