deceptive mail
Karl Kleinpaste
karl at osu-eddie.UUCP
Wed Nov 21 14:45:34 AEST 1984
----------
>>>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 at Rand-Relay
More information about the Comp.unix.wizards
mailing list