Priority messages in Unix

Guy Harris guy at auspex.auspex.com
Tue Apr 18 09:10:43 AEST 1989


 >>  On most BSD-derivative systems no user other than the owner has
 >>access to your tty, nor can you modify your own.  Talk requests and such
 >>are done through a system of daemon processes which control user access
 >>to each other.  This was done in order to remove the ever frustrating
 >>moment when someone does a "cat</etc/hosts>/dev/ttyxx&" to your terminal.
 >
 >  Unfortunately, at least in SunOS 3.4 (4.2-BSD derived), this isn't
 >quite true.

The "4.2-BSD derived" is the clue.  The "group write only" stuff was
introduced in 4.3BSD, and first appears in SunOS in 4.0.  In systems
derived from 4.3BSD (which may include S5R4 - I think the intent is to
incorporate this feature there), "mesg y" only turns on group write
permission.  Programs such as "write" and "talk" are set-GID to group
"tty", and that group owns login terminals.  "write" will write directly
to the terminal, rather than going through a daemon; however, if group
write permission is turned off for the terminal (e.g. with "mesg n"), it
hasn't permission to write to somebody else's terminal.



More information about the Comp.unix.wizards mailing list