Re: Converting login user IDs to lowercase

Jon Lewis (jlewis@inorganic5.fdt.net)
Thu, 17 Oct 1996 12:48:55 -0400 (EDT)

On Thu, 17 Oct 1996, Dale E. Reed Jr. wrote:

> Ed Longstrom wrote:
> >
> > I think C has tolower(); which will convert
> > uppercase to lowercase.
>
> or just use stricmp() in place of strcmp() and be done
> with it. :)

I think Ed had the right idea. What will you do with stricmp in the
following:

/* Get encrypted password from password file */
if((pwd = getpwnam(name)) == NULL) {
return(-1);
}

On Linux, libc uses strcmp in getpwnam. Of course you could declare
usernames to be case insensitive and hack your libc to make it so...but
the original poster claimed little experience with C...so hacking the
shared libraries is probably a bit more than he wants to tackle.

------------------------------------------------------------------
Jon Lewis <jlewis@fdt.net> | Unsolicited commercial e-mail will
Network Administrator | be proof-read for $199/hr.
________Finger jlewis@inorganic5.fdt.net for PGP public key_______