From: hno <> Date: Mon, 27 Aug 2007 20:51:41 +0000 (+0000) Subject: Allow for more complex filters in squid_ldap_auth X-Git-Tag: SQUID_3_0_PRE7~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0af6cde904bfc1f5e025a55283a9e79643f66619;p=thirdparty%2Fsquid.git Allow for more complex filters in squid_ldap_auth --- diff --git a/helpers/basic_auth/LDAP/squid_ldap_auth.c b/helpers/basic_auth/LDAP/squid_ldap_auth.c index cf2727bde0..d221304d86 100644 --- a/helpers/basic_auth/LDAP/squid_ldap_auth.c +++ b/helpers/basic_auth/LDAP/squid_ldap_auth.c @@ -342,7 +342,7 @@ validUsername(const char *user) int main(int argc, char **argv) { - char buf[256]; + char buf[1024]; char *user, *passwd; char *ldapServer = NULL; LDAP *ld = NULL; @@ -565,7 +565,7 @@ main(int argc, char **argv) } #endif - while (fgets(buf, 256, stdin) != NULL) { + while (fgets(buf, sizeof(buf), stdin) != NULL) { user = strtok(buf, " \r\n"); passwd = strtok(NULL, "\r\n"); @@ -638,7 +638,7 @@ ldap_escape_value(char *escaped, int size, const char *src) static int checkLDAP(LDAP * persistent_ld, const char *userid, const char *password, const char *ldapServer, int port) { - char dn[256]; + char dn[1024]; int ret = 0; LDAP *bind_ld = NULL; @@ -651,8 +651,8 @@ checkLDAP(LDAP * persistent_ld, const char *userid, const char *password, const return 1; } if (searchfilter) { - char filter[256]; - char escaped_login[256]; + char filter[16384]; + char escaped_login[1024]; LDAPMessage *res = NULL; LDAPMessage *entry; char *searchattr[] =