autofs-5.0.5 - fix simple bind without SASL support

From: Ian Kent <raven@themaw.net>

If autofs is compiled without SASL support simple bind authentication
fails to function.
---

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


diff --git a/CHANGELOG b/CHANGELOG
index 66392bf..15dbfae 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -75,6 +75,7 @@
 - fix sanity checks for brackets in server name.
 - fix lsb service name in init script.
 - fix map source check in file lookup.
+- fix simple bind without SASL support.
 
 03/09/2009 autofs-5.0.5
 -----------------------
diff --git a/modules/lookup_ldap.c b/modules/lookup_ldap.c
index 1b77e03..1018839 100644
--- a/modules/lookup_ldap.c
+++ b/modules/lookup_ldap.c
@@ -1463,7 +1463,6 @@ int lookup_init(const char *mapfmt, int argc, const char *const *argv, void **co
 		}
 	}
 
-#ifdef WITH_SASL
 	/*
 	 *  First, check to see if a preferred authentication method was
 	 *  specified by the user.  parse_ldap_config will return error
@@ -1476,6 +1475,7 @@ int lookup_init(const char *mapfmt, int argc, const char *const *argv, void **co
 		return 1;
 	}
 
+#ifdef WITH_SASL
 	/* Init the sasl callbacks */
 	if (!autofs_sasl_client_init(LOGOPT_NONE)) {
 		error(LOGOPT_ANY, "failed to init sasl client");