- updated to 5.0.8
[packages/autofs.git] / autofs-5.0.8-fix-undefined-authtype_requires_creds-err-if-ldap-en.patch
CommitLineData
15dae982
JR
1autofs-5.0.8 - fix undefined authtype_requires_creds err if ldap enabled but without sasl
2
3From: Lan Yixun (dlan) <dennis.yxun@gmail.com>
4
5This patch is moving "WITH_SASL" into authtype_requires_creds function
6make it return 0 if sasl not enabled, which mean authtype_requires_creds is not enabled
7
8https://bugs.gentoo.org/show_bug.cgi?id=489128
9---
10 CHANGELOG | 4 ++++
11 modules/lookup_ldap.c | 4 ++--
12 2 files changed, 6 insertions(+), 2 deletions(-)
13
14diff --git a/CHANGELOG b/CHANGELOG
15index 62dac81..a45ca6a 100644
16--- a/CHANGELOG
17+++ b/CHANGELOG
18@@ -1,3 +1,7 @@
19+??/??/20?? autofs-5.0.9
20+=======================
21+- fix undefined authtype_requires_creds err if ldap enabled but without sasl.
22+
23 17/10/2013 autofs-5.0.8
24 =======================
25 - fix nobind sun escaped map entries.
26diff --git a/modules/lookup_ldap.c b/modules/lookup_ldap.c
27index 2ab1e8c..04b1da7 100644
28--- a/modules/lookup_ldap.c
29+++ b/modules/lookup_ldap.c
30@@ -846,20 +846,20 @@ int get_property(unsigned logopt, xmlNodePtr node, const char *prop, char **valu
31 return 0;
32 }
33
34-#ifdef WITH_SASL
35 /*
36 * For plain text, login and digest-md5 authentication types, we need
37 * user and password credentials.
38 */
39 int authtype_requires_creds(const char *authtype)
40 {
41+#ifdef WITH_SASL
42 if (!strncmp(authtype, "PLAIN", strlen("PLAIN")) ||
43 !strncmp(authtype, "DIGEST-MD5", strlen("DIGEST-MD5")) ||
44 !strncmp(authtype, "LOGIN", strlen("LOGIN")))
45 return 1;
46+#endif
47 return 0;
48 }
49-#endif
50
51 /*
52 * Returns:
This page took 0.0386919999999999 seconds and 4 git commands to generate.