Re: tty chowning

Theodore Y. Ts'o (tytso@MIT.EDU)
Fri, 26 Sep 1997 15:01:18 -0400


From: David Holland <dholland@eecs.harvard.edu>
Date: Fri, 26 Sep 1997 07:26:09 -0400 (EDT)

Why not build chowning into this process? On TIOCSCTTY, the tty would
chown itself to the effective uid of the current process and chmod
itself to 620. Then, on close, the tty would chown itself back to
root and chmod itself to 666.

It's a not a bad idea, but it's not clear it meets your goal of not
requiring any changes of any binaries. The problem is that in many
cases, the TIOCSCTTY happens before the effective uid is set. For
example, in the getty/login case, the controlling tty is established
even before we know who is going to be logging in.

- Ted