aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-05-27 13:30:10 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-05-27 13:30:10 +0000
commit0ae2420f0189b2cfd3668f115eeaac8521838a29 (patch)
tree0d4156fc1534be7bc12dbe7d331df740a5c2ec2f /res
parent6705ac3b96b2320190cb3b5010e86764cd2b80d3 (diff)
When binding anonymously, credentials are still needed.
(closes issue #12601) Reported by: suretec Patches: res_config_ldap.c.patch uploaded by suretec (license 70) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@118302 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r--res/res_config_ldap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/res/res_config_ldap.c b/res/res_config_ldap.c
index b8816b920..7ce37c65c 100644
--- a/res/res_config_ldap.c
+++ b/res/res_config_ldap.c
@@ -1504,7 +1504,9 @@ static int ldap_reconnect(void)
bind_result = ldap_sasl_bind_s(ldapConn, user, LDAP_SASL_SIMPLE, &cred, NULL, NULL, NULL);
} else {
ast_debug(2, "bind %s anonymously\n", url);
- bind_result = ldap_sasl_bind_s(ldapConn, NULL, LDAP_SASL_SIMPLE, NULL, NULL, NULL, NULL);
+ cred.bv_val = NULL;
+ cred.bv_len = 0;
+ bind_result = ldap_sasl_bind_s(ldapConn, NULL, LDAP_SASL_SIMPLE, &cred, NULL, NULL, NULL);
}
if (bind_result == LDAP_SUCCESS) {
ast_debug(2, "Successfully connected to database.\n");