]>
Commit | Line | Data |
---|---|---|
15dae982 JR |
1 | autofs-5.0.8 - fix undefined authtype_requires_creds err if ldap enabled but without sasl |
2 | ||
3 | From: Lan Yixun (dlan) <dennis.yxun@gmail.com> | |
4 | ||
5 | This patch is moving "WITH_SASL" into authtype_requires_creds function | |
6 | make it return 0 if sasl not enabled, which mean authtype_requires_creds is not enabled | |
7 | ||
8 | https://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 | ||
14 | diff --git a/CHANGELOG b/CHANGELOG | |
15 | index 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. | |
26 | diff --git a/modules/lookup_ldap.c b/modules/lookup_ldap.c | |
27 | index 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: |