Blame SOURCES/autofs-5.0.8-fix-undefined-authtype_requires_creds-err-if-ldap-en.patch

6bbd11
autofs-5.0.8 - fix undefined authtype_requires_creds err if ldap enabled but without sasl
6bbd11
6bbd11
From: Lan Yixun (dlan) <dennis.yxun@gmail.com>
6bbd11
6bbd11
This patch is moving "WITH_SASL" into authtype_requires_creds function
6bbd11
make it return 0 if sasl not enabled, which mean authtype_requires_creds is not enabled
6bbd11
6bbd11
https://bugs.gentoo.org/show_bug.cgi?id=489128
6bbd11
---
6bbd11
 CHANGELOG             |    1 +
6bbd11
 modules/lookup_ldap.c |    4 ++--
6bbd11
 2 files changed, 3 insertions(+), 2 deletions(-)
6bbd11
6bbd11
--- autofs-5.0.7.orig/CHANGELOG
6bbd11
+++ autofs-5.0.7/CHANGELOG
6bbd11
@@ -83,6 +83,7 @@
6bbd11
 - check for existing offset mount before mounting.
6bbd11
 - fix cache readlock not taken on lookup.
6bbd11
 - fix compilation of lookup_ldap.c without sasl.
6bbd11
+- fix undefined authtype_requires_creds err if ldap enabled but without sasl.
6bbd11
 
6bbd11
 25/07/2012 autofs-5.0.7
6bbd11
 =======================
6bbd11
--- autofs-5.0.7.orig/modules/lookup_ldap.c
6bbd11
+++ autofs-5.0.7/modules/lookup_ldap.c
6bbd11
@@ -813,20 +813,20 @@ int get_property(unsigned logopt, xmlNod
6bbd11
 	return 0;
6bbd11
 }
6bbd11
 
6bbd11
-#ifdef WITH_SASL
6bbd11
 /*
6bbd11
  *  For plain text, login and digest-md5 authentication types, we need
6bbd11
  *  user and password credentials.
6bbd11
  */
6bbd11
 int authtype_requires_creds(const char *authtype)
6bbd11
 {
6bbd11
+#ifdef WITH_SASL
6bbd11
 	if (!strncmp(authtype, "PLAIN", strlen("PLAIN")) ||
6bbd11
 	    !strncmp(authtype, "DIGEST-MD5", strlen("DIGEST-MD5")) ||
6bbd11
 	    !strncmp(authtype, "LOGIN", strlen("LOGIN")))
6bbd11
 		return 1;
6bbd11
+#endif
6bbd11
 	return 0;
6bbd11
 }
6bbd11
-#endif
6bbd11
 
6bbd11
 /*
6bbd11
  *  Returns: