Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!mordor!sri-spam!sri-unix!hplabs!tektronix!tekgen!tektools!tonyb From: tonyb@tektools.UUCP (Tony Birnseth) Newsgroups: comp.bugs.4bsd Subject: Attempted 'login' command can log user off Message-ID: <1990@tektools.UUCP> Date: Thu, 11-Dec-86 23:34:23 EST Article-I.D.: tektools.1990 Posted: Thu Dec 11 23:34:23 1986 Date-Received: Mon, 15-Dec-86 04:28:49 EST Organization: Tektronix Inc., Beaverton, Or. Lines: 63 Keywords: login execl not nice Index: /bin/csh 4.3BSD Description: On systems where port contention may be high, csh causes unnecessary logout if the execl() of /bin/login fails. Since having /bin/login world executable has certain secrurity implications, it is just plain unkind to force a user to loose their session if the execl() fails. Repeat by: Make /bin/login not executable by the world. % login sysadmin (logged out here! must now try to get another port or redial through a slow modem pool) Fix: Remove the untty() and exit(), replacing them with an informational message. Apply the following diffs to sh.func.c and add -DTEK_BUGS to 'DEFS' in the Makefile. *** /tmp/,RCSt1027852 Thu Dec 11 17:03:03 1986 --- sh.func.c Thu Dec 11 16:58:59 1986 *************** *** 179,184 rechist(); (void) signal(SIGTERM, parterm); execl("/bin/login", "login", v[1], 0); untty(); exit(1); } --- 179,191 ----- rechist(); (void) signal(SIGTERM, parterm); execl("/bin/login", "login", v[1], 0); + #ifdef TEK_BUGS + /* + * Since ports may be in high demand, it is much nicer to give the + * user the choice rather than drop them cause the exec failed. + */ + printf("execl of /bin/login failed, logout and re-login!\n"); + #else /* ! TEK_BUGS */ untty(); exit(1); #endif /* TEK_BUGS */ *************** *** 181,186 execl("/bin/login", "login", v[1], 0); untty(); exit(1); } #ifdef NEWGRP --- 188,194 ----- #else /* ! TEK_BUGS */ untty(); exit(1); + #endif /* TEK_BUGS */ } #ifdef NEWGRP