Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utcsrgv!garfield!andrew From: andrew@garfield.UUCP (Andrew Drasskoy) Newsgroups: net.unix-wizards Subject: Re: Tioccdtr (bug|feature) Message-ID: <425@garfield.UUCP> Date: Wed, 22-Jun-83 01:34:39 EDT Article-I.D.: garfield.425 Posted: Wed Jun 22 01:34:39 1983 Date-Received: Thu, 23-Jun-83 01:35:43 EDT Lines: 14 The TIOCCDTR "feature" was discovered on our system over a year ago. The fix implemented here was to make write setuid to root and have most of the tty protections set to 700 by default. The problem with this approach is that write will always be able to open a terminal. The fix for this is simple too, though not very obvious. The biff and mesg programmes set *execute* permissions for owner and other, respectively, on the user's terminal. When you want to write to someone, the write programme checks the 001 protection bit to see if the person wants to accept messages or not. The execute permission bits can be used for this since they are otherwise meaningless on a terminal. This has worked very well here, and there seem to be no problems with it, although it is a bit kludgey. Andrew Drasskoy {allegra,utcsrgv}!garfield!andrew