Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site watcgl.UUCP Path: utzoo!watmath!watcgl!dmmartindale From: dmmartindale@watcgl.UUCP (Dave Martindale) Newsgroups: net.unix-wizards Subject: Re: deceptive mail and /bin/login Message-ID: <510@watcgl.UUCP> Date: Tue, 20-Nov-84 13:48:36 EST Article-I.D.: watcgl.510 Posted: Tue Nov 20 13:48:36 1984 Date-Received: Wed, 21-Nov-84 00:04:12 EST References: <5857@brl-tgr.ARPA> Organization: U of Waterloo, Ontario Lines: 15 > > Make /bin/login mode 500 owned by root and it will fail on exec, > > usually causing /etc/init to fork another copy of itself and the > > new user to thus get a fresh copy of /bin/login for normal login, > > Of course, if you are dialed up or are connected through a switch on a > line that has the TIOCHPCL bit set, the line gets dropped before init > has the chance to start a new getty (getty execs login after it gets > the login name). I'm afraid I don't like that idea much. > William LeFebvre How about having login check that its parent is init (i.e. parent's PID==1)? Then, you can still do "login newuser" from the shell, as designed, and everything works properly, but people who try to do the bogus "(login newuser)" get thrown back into their original shell without the wtmp ever getting changed.