[net.bugs.4bsd] login fails on lid's > 8 chars in passwd

ptw@encore.UUCP (P. Tucker Withington) (01/09/85)

Index: login.c 4.33 83/09/02

I had occasion to use a long login name the other day and it wouldn't grok.
Can't say if this is a "feature", but I suppose I violated the Unix philosophy
by using more than eight chars in an identifier (:-)!

Login only reads NMAX == sizeof(utmp.u_pass) chars from tty when fetching
login id (lid), but getpwnam uses strcmp to find entries.  Therefore, any passwd
entry with lid > 8 will never be found!

Repeat-by:  Make a passwd lid > 8 chars and try to log in to it.

Quick fix:  truncate all passwd lid's to 8.

Real fix:  Either login reads more chars or getpwnam uses strncmp.

Implementation left as an exercise or for debate.

                               o.o      --tucker
                                ~