]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: isaac <isaacarsenal@gmail.com>
authorAmos Jeffries <amosjeffries@squid-cache.org>
Wed, 21 Jul 2010 08:08:26 +0000 (02:08 -0600)
committerAmos Jeffries <amosjeffries@squid-cache.org>
Wed, 21 Jul 2010 08:08:26 +0000 (02:08 -0600)
Bug 2985: search scope for digest_ldap_auth didn't work

helpers/digest_auth/ldap/ldap_backend.c

index 08c8841324db09eeb4cc9e8a6fa3f634c5fb74b0..023d2e8be6522e0c6476a745f3b0aa6d28b77aff 100644 (file)
@@ -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);