Ian Kent 5c7852
autofs-5.0.5 - fix reconnect get base dn
Ian Kent 5c7852
Ian Kent 5c7852
From: Ian Kent <raven@themaw.net>
Ian Kent 5c7852
Ian Kent 5c7852
If connect to an LDAP server but fail to find a valid query dn a
Ian Kent 5c7852
subsequent reconnect succeeds without setting the schema fields
Ian Kent 5c7852
used for constructing queries. A segfault then occurs when we try
Ian Kent 5c7852
to construct a query using the schema values that should have been
Ian Kent 5c7852
set during the query dn validation.
Ian Kent 5c7852
---
Ian Kent 5c7852
Ian Kent 5c7852
 CHANGELOG             |    1 +
Ian Kent 5c7852
 modules/lookup_ldap.c |    2 +-
Ian Kent 5c7852
 2 files changed, 2 insertions(+), 1 deletion(-)
Ian Kent 5c7852
Ian Kent 5c7852
Ian Kent 5c7852
--- autofs-5.0.5.orig/CHANGELOG
Ian Kent 5c7852
+++ autofs-5.0.5/CHANGELOG
Ian Kent 5c7852
@@ -21,6 +21,7 @@
Ian Kent 5c7852
 - fix random selection option.
Ian Kent 5c7852
 - fix disable timeout.
Ian Kent 5c7852
 - fix strdup() return value check (Leonardo Chiquitto).
Ian Kent 5c7852
+- fix reconnect get base dn.
Ian Kent 5c7852
 
Ian Kent 5c7852
 03/09/2009 autofs-5.0.5
Ian Kent 5c7852
 -----------------------
Ian Kent 5c7852
--- autofs-5.0.5.orig/modules/lookup_ldap.c
Ian Kent 5c7852
+++ autofs-5.0.5/modules/lookup_ldap.c
Ian Kent 5c7852
@@ -556,7 +556,7 @@ static int do_bind(unsigned logopt, LDAP
Ian Kent 5c7852
 		}
Ian Kent 5c7852
 	}
Ian Kent 5c7852
 
Ian Kent 5c7852
-	if (!need_base)
Ian Kent 5c7852
+	if (ctxt->schema && !need_base)
Ian Kent 5c7852
 		return 1;
Ian Kent 5c7852
 
Ian Kent 5c7852
 	/*