AW: transform capital letters in usernames?

From: Beck, Mike <Mike.Beck@dont-contact.us>
Date: Thu, 13 Jul 2000 13:06:30 +0200

Thank you very much, i used that on ver 2.3 STABLE 3 and it works!

> -----Ursprüngliche Nachricht-----
> Von: Chemolli Francesco (USI) [mailto:ChemolliF@GruppoCredit.it]
> Gesendet: Mittwoch, 12. Juli 2000 13:49
> An: 'Beck, Mike'; 'Henrik Nordstrom'
> Cc: 'Squid-Users'; 'squid-dev@squid-cache.org'
> Betreff: RE: transform capital letters in usernames?
> Wichtigkeit: Hoch
>
>
<snip>
> >
> > Therefore it would have to be done in Squid. There should be
> > a possiblity to
> > make it case-insensitive when it comes to usernames (or maybe
> > even accept
> > regex, though i doubt there is much use for that).
> > Unfortunately i am not
> > very good at C (which i suspect squid has been written in).
>
> To address this problem I patched the acl.c file.
> Using an hack to address the issue would be quite simple, I am not
> sure whether it would be appropriately "clean".
>
> The (untested) hack I am talking about would be something
> along the lines of
> (in acl.c):
>
>
> static int
> aclMatchUser(wordlist * data, const char *user)
> {
> int cis=0; /* set to 1 for case-insensitive usernames */
> /* changed here */
> if (user == NULL)
> return 0;
> debug(28, 3) ("aclMatchUser: checking '%s'\n", user);
> while (data) {
> debug(28, 3) ("aclMatchUser: looking for '%s'\n", data->key);
> if (strcmp(data->key,"-i") == 0) {
> debug(28, 3) ("aclMatchUser: going case-insensitive\n");
> cis=1;
> }
> if (strcmp(data->key, "REQUIRED") == 0 && *user != '\0' &&
> strcmp(user,
> "-") != 0)
> return 1;
> if ((cis == 0 && strcmp(data->key, user) == 0) ||
> strcasecmp(data->key,user) == 0) /* changed here */
> return 1;
> data = data->next;
> }
> return 0;
> }
>
>
Received on Thu Jul 13 2000 - 05:10:36 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:54:31 MST