1 diff --git a/CHANGELOG b/CHANGELOG
2 index ef549cf..08afa7c 100644
6 - add random selection as a master map entry option.
7 - fix couple of edge case parse fails of timeout option.
8 - check for "*" when looking up wildcard in LDAP.
9 +- fix LDAP schema discovery.
11 18/06/2007 autofs-5.0.2
12 -----------------------
13 diff --git a/modules/lookup_ldap.c b/modules/lookup_ldap.c
14 index a7b315e..9c18ca1 100644
15 --- a/modules/lookup_ldap.c
16 +++ b/modules/lookup_ldap.c
17 @@ -1009,6 +1009,15 @@ int lookup_init(const char *mapfmt, int argc, const char *const *argv, void **co
22 + const char *class = ctxt->schema->map_class;
23 + const char *key = ctxt->schema->map_attr;
24 + if (!get_query_dn(ldap, ctxt, class, key)) {
25 + unbind_ldap_connection(ldap, ctxt);
26 + error(LOGOPT_ANY, MODPREFIX "failed to get query dn");
31 unbind_ldap_connection(ldap, ctxt);