[1485] in SIPB_Linux_Development

home help back first fref pref prev next nref lref last post

Re: /bin/athena/login

daemon@ATHENA.MIT.EDU (Theodore Y. Ts'o)
Mon Oct 21 10:49:16 1996

Date: Mon, 21 Oct 1996 10:48:35 -0400
From: "Theodore Y. Ts'o" <tytso@MIT.EDU>
To: Salvatore Valente <svalente@MIT.EDU>
Cc: warlord@MIT.EDU, linux-dev@MIT.EDU
In-Reply-To: Salvatore Valente's message of Sun, 20 Oct 1996 21:45:11 -0400,
	<199610210145.VAA12182@cutter-john.mit.edu>

   Date: Sun, 20 Oct 1996 21:45:11 -0400
   Cc: linux-dev@MIT.EDU
   From: Salvatore Valente <svalente@MIT.EDU>

   I have no idea why vhangup() would cause login to exit.  (The
   documentation I've managed to find about vhangup() is unimpressive.)
   (I didn't put that call into login, it was there in the source code
   for Linux /bin/login at the time I added the Athena hacks to it.)

Vhangup() is a BSD 4.3-ism.  What it does is force a virtual hangup on
the process's controlling tty.  That means *all* filedescriptors on that
tty become revoked (reads return EOF, writes return EIO) and all
processes belonging to the tty's session receive a SIGHUP.

This is done to prevent trojan horse programs from retaining access to
the tty after the user logs out (to try to steal the next user's
passsword, etc.).  Usually it's getty/telnetd/rlogind that calls
vhangup(), since they're the programs that initially get the tty,
chown/chmod it appropriately, etc.

							- Ted

home help back first fref pref prev next nref lref last post