Blob Blame History Raw
autofs-5.0.5 - fix reconnect get base dn

From: Ian Kent <raven@themaw.net>

If connect to an LDAP server but fail to find a valid query dn a
subsequent reconnect succeeds without setting the schema fields
used for constructing queries. A segfault then occurs when we try
to construct a query using the schema values that should have been
set during the query dn validation.
---

 CHANGELOG             |    1 +
 modules/lookup_ldap.c |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)


--- autofs-5.0.5.orig/CHANGELOG
+++ autofs-5.0.5/CHANGELOG
@@ -21,6 +21,7 @@
 - fix random selection option.
 - fix disable timeout.
 - fix strdup() return value check (Leonardo Chiquitto).
+- fix reconnect get base dn.
 
 03/09/2009 autofs-5.0.5
 -----------------------
--- autofs-5.0.5.orig/modules/lookup_ldap.c
+++ autofs-5.0.5/modules/lookup_ldap.c
@@ -556,7 +556,7 @@ static int do_bind(unsigned logopt, LDAP
 		}
 	}
 
-	if (!need_base)
+	if (ctxt->schema && !need_base)
 		return 1;
 
 	/*