Subject: Re: pcvt and TIOCCONS
To: Gordon W. Ross <email@example.com>
From: Chris G Demetriou <Chris_G_Demetriou@UX2.SP.CS.CMU.EDU>
Date: 04/11/1996 20:11:21
> CGD suggested that we implement something like the /etc/fbtab
> feature from SunOS (but with more generality). Here is how it
> might work. The file /etc/ttygroup (or whatever name you like)
> would contain the following fields:
> login_tty modes related_device #comments
> Sample contents of this file for the Sun3 would be:
> /dev/kd 0600 /dev/kbd
> /dev/kd 0600 /dev/mouse
> /dev/kd 0620 /dev/fb
> /dev/kd 0620 /dev/bwtwo0
> /dev/kd 0620 /dev/bwtwo1
> /dev/kd 0620 /dev/cgtwo0
> /dev/kd 0620 /dev/cgthree0
> /dev/kd 0620 /dev/cgfour0
> /dev/kd 0622 /dev/console #ONLY if console is on "kd"
> The above file would be processed by login and getty as follows:
> When login authenticates user $UID and has done a chown of the
> login tty, it then scans the /etc/ttygroup file for lines with
> a matching $login_tty field. For each match, it should do
> chown and chmod calls equivalent to:
> chown $UID $related_device
> chmod $modes $related_device
> Similarly, after a logout, when getty is started on a tty line,
> it will scan /etc/ttygroup for lines match the login_tty and will
> do chown and chmod calls equivalent to:
> chown 0600 $related_device
> chown root $related_device
> (Maybe a revoke(2) call as well?)
> So, that's how I think it should work. Does this sound OK?
Note that i said _MORE_ generality...
In other words, i don't like the proposal you've outlined above, for
(1) it's _less_ general than SunOS /etc/fbtab, and
(2) it's not _more_ general than SunOS /etc/fbtab...
In particular, what i _really_ want is some way to specify explicit
actions to be invoked on log-out.
For instance, say i want JoeBob to own the console CD-ROM device when
he logs in. I also want a mechanism by which i can forcibly unmount
anything he's mounted from there (let's not forget about user mounts!)
and eject the CD-ROM, when he logs out. (That, in addition to
specifying the perms and ownership/group of the file, to be set on
> Are there any volunteers to make login and getty do this?
You also don't really want to do much to "make login and getty do [all
You want to do this by implementing a couple of library (libutil?)
routines to do it, and just hooking them in the right places in the
code that handles login and logout...
That not only minimizes diffs to various programs, it also makes life
easier for people porting or writing third-party "login management"