Skip to content
Snippets Groups Projects
Commit 6006f40c authored by Tilghman Lesher's avatar Tilghman Lesher
Browse files

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: https://origsvn.digium.com/svn/asterisk/trunk@118302 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 1c51fec0
No related merge requests found
......@@ -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");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment