Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 beta 3/9/83; site encore.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!harvard!talcott!encore!ptw From: ptw@encore.UUCP (P. Tucker Withington) Newsgroups: net.bugs.4bsd Subject: login fails on lid's > 8 chars in passwd Message-ID: <135@encore.UUCP> Date: Wed, 9-Jan-85 13:03:34 EST Article-I.D.: encore.135 Posted: Wed Jan 9 13:03:34 1985 Date-Received: Sat, 12-Jan-85 00:44:57 EST Organization: Encore Computer Corp., Wellesley Hills, MA Lines: 20 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 ~