summaryrefslogtreecommitdiff
path: root/net-fs/autofs/files/autofs-5.0.8-ldap-wo-sasl.patch
blob: a64ed7e8157fcba7655d5c720bf1c23beef96eb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
diff --git a/modules/lookup_ldap.c b/modules/lookup_ldap.c
index 2ab1e8c..04b1da7 100644
--- a/modules/lookup_ldap.c
+++ b/modules/lookup_ldap.c
@@ -846,20 +846,20 @@ int get_property(unsigned logopt, xmlNodePtr node, const char *prop, char **valu
 	return 0;
 }
 
-#ifdef WITH_SASL
 /*
  *  For plain text, login and digest-md5 authentication types, we need
  *  user and password credentials.
  */
 int authtype_requires_creds(const char *authtype)
 {
+#ifdef WITH_SASL
 	if (!strncmp(authtype, "PLAIN", strlen("PLAIN")) ||
 	    !strncmp(authtype, "DIGEST-MD5", strlen("DIGEST-MD5")) ||
 	    !strncmp(authtype, "LOGIN", strlen("LOGIN")))
 		return 1;
+#endif
 	return 0;
 }
-#endif
 
 /*
  *  Returns: