Re: transform capital letters in usernames?

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Thu, 03 Aug 2000 23:36:09 +0200

Yes, there is a need for case-insensitive proxy_auth/ident ACL lists.
Hoever, I do not think this is the appropriate method for doing so.

It is more appropriate if the ACL is changed to have a somewhat larger
definition than simply a wordlist. For example there is need for a flag
telling that the ACL is case-insensitive, just as there is for the
regexp based ACL lists. In fact it should probably be changed to use a
splay list at the same time.

Anyone willing at taking a stab at this are welcome, and it will get
committed. The code below can be used as a baindaid if no-one have the
time to do a proper implementation before 2.4 release.

/Henrik

Chemolli Francesco (USI) wrote:

> 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 Aug 03 2000 - 15:36:28 MDT

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