[asterisk-commits] tilghman: trunk r118302 - /trunk/res/res_config_ldap.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue May 27 08:30:10 CDT 2008


Author: tilghman
Date: Tue May 27 08:30:10 2008
New Revision: 118302

URL: http://svn.digium.com/view/asterisk?view=rev&rev=118302
Log:
When binding anonymously, credentials are still needed.
(closes issue #12601)
 Reported by: suretec
 Patches: 
       res_config_ldap.c.patch uploaded by suretec (license 70)

Modified:
    trunk/res/res_config_ldap.c

Modified: trunk/res/res_config_ldap.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_config_ldap.c?view=diff&rev=118302&r1=118301&r2=118302
==============================================================================
--- trunk/res/res_config_ldap.c (original)
+++ trunk/res/res_config_ldap.c Tue May 27 08:30:10 2008
@@ -1504,7 +1504,9 @@
 		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");




More information about the asterisk-commits mailing list