rang@cpsin3.cps.msu.edu (Anton Rang) (04/15/89)
In article <539@lakesys.UUCP> chad@lakesys.UUCP (Chad Gibbons) writes: > 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. >-- >D. Chadwick Gibbons, chad@lakesys.lakesys.com, ...!uunet!marque!lakesys!chad Unfortunately, at least in SunOS 3.4 (4.2-BSD derived), this isn't quite true. Yes, talk requests etc. are done through a system of daemons. But you don't get talk requests etc. unless you execute 'mesg y', which turns on world write access to your /dev/tty, which allows "cp /etc/hosts /dev/ttypxx" (or your favorite command...I always liked echoing a power-on reset sequence :-).... +---------------------------+------------------------+----------------------+ | Anton Rang (grad student) | "VMS Forever!" | "Do worry...be SAD!" | | Michigan State University | rang@cpswh.cps.msu.edu | | +---------------------------+------------------------+----------------------+
andrew@frip.wv.tek.com (Andrew Klossner) (04/18/89)
[] "On most BSD-derivative systems no user other than the owner has access to your tty, nor can you modify your own." On most BSD-derivative systems, you can modify access to your own tty with a command such as: chmod a+w `tty` which will give everyone write access to your tty, until you log out. -=- Andrew Klossner (uunet!tektronix!orca!frip!andrew) [UUCP] (andrew%frip.wv.tek.com@relay.cs.net) [ARPA]
guy@auspex.auspex.com (Guy Harris) (04/18/89)
>> 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.