From: Amos Jeffries Date: Wed, 21 Jul 2010 08:08:26 +0000 (-0600) Subject: Author: isaac X-Git-Tag: SQUID_3_1_5_1~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=515ae9d32f128c6896d8cbbdf5cc633ee3e02bf9;p=thirdparty%2Fsquid.git Author: isaac Bug 2985: search scope for digest_ldap_auth didn't work --- diff --git a/helpers/digest_auth/ldap/ldap_backend.c b/helpers/digest_auth/ldap/ldap_backend.c index 08c8841324..023d2e8be6 100644 --- a/helpers/digest_auth/ldap/ldap_backend.c +++ b/helpers/digest_auth/ldap/ldap_backend.c @@ -237,12 +237,12 @@ retrysrch: } } } else if (userdnattr) { - sprintf(searchbase, "%s=%s, %s", userdnattr, login, userbasedn); + snprintf(filter,8192,"%s=%s",userdnattr,login); retrydnattr: if (show_debug_messages) - fprintf(stderr, "searchbase '%s'\n", searchbase); - rc = ldap_search_s(ld, searchbase, searchscope, NULL, NULL, 0, &res); + fprintf(stderr, "searchbase '%s'\n", userbasedn); + rc = ldap_search_s(ld, userbasedn, searchscope, filter, NULL, 0, &res); } if (rc == LDAP_SUCCESS) { entry = ldap_first_entry(ld, res);