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

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