Path: utzoo!dptcdc!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.unix.wizards Subject: Re: Priority messages in Unix Message-ID: <1454@auspex.auspex.com> Date: 17 Apr 89 23:10:43 GMT References: <1857@wpi.wpi.edu> <538@lakesys.UUCP> <539@lakesys.UUCP> <2522@cps3xx.UUCP> Reply-To: guy@auspex.auspex.com (Guy Harris) Distribution: na Organization: Auspex Systems, Santa Clara Lines: 19 >> 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/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.