Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site osu-eddie.UUCP Path: utzoo!watmath!clyde!cbosgd!osu-eddie!karl From: karl@osu-eddie.UUCP (Karl Kleinpaste) Newsgroups: net.unix-wizards Subject: Re: Re: deceptive mail Message-ID: <115@osu-eddie.UUCP> Date: Tue, 20-Nov-84 23:45:34 EST Article-I.D.: osu-eddi.115 Posted: Tue Nov 20 23:45:34 1984 Date-Received: Wed, 21-Nov-84 08:43:27 EST References: <331@uvm-cs.UUCP> <45@uwvax.UUCP> <221@turing.UUCP> Organization: Society for the Advancement of Raw Weirdness Lines: 30 ---------- >>>I tend to like my mail coming from whomever the person is currently, not who >>>they logged in as! >> >>It is even worse: if you are working at a terminal, somebody comes along >>and in order to show you something logs in recursively: (login x) >>then after his login process has finished your identity will be reported >>as x by programs like who and routines like getlogin(). > > If someone comes up to your terminal and types "login name" you > will be logged out and he will be logged in. If his login process > "finishes" i.e. he logs out, the system will display a login > banner. YOU WILL BE GONE! I'd say whoever did this when you were > at a terminal walked away without logging off. Are you confusing > login with su??? ---------- Geez, lighten up, cool down, and take a quarter off and think about it. The indicated bug-causing example said, "(login x)" which has a set of parentheses associated with it. That tells any shell of which I'm aware to execute the command in a subshell. So your newly-created subshell exec's login directly, leaving you again with a recursive login. The login program will, of course, do kinky things to /etc/utmp, changing the results of getlogin() calls thereafter. And, when the recursive login exits, /etc/utmp will not be restored to its previous condition for the simple reason that the 2nd login was not a child of init, which normally updates /etc/utmp on logout. -- Karl Kleinpaste @ Bell Labs, Columbus 614/860-5107 {cbosgd,ihnp4}!cbrma!kk @ Ohio State University 614/891-5058 cbosgd!osu-eddie!karl karl.Ohio-State@Rand-Relay