Tioccdtr (bug|feature)

Andrew Drasskoy andrew at garfield.UUCP
Wed Jun 22 15:34:39 AEST 1983


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



More information about the Comp.unix.wizards mailing list