Why 4BSD 'stty' uses stdout instead of stdin

The WITNESS bsa at ncoast.UUCP
Sat Aug 18 04:28:58 AEST 1984


[The world is a Klein bottle]

> From: gwyn at brl-tgr.ARPA (Doug Gwyn <gwyn>)

> At BRL, general terminals do not have write permission enabled;
> rather, the execute bit indicates whether a "write" or "talk"
> connection is permitted, and the utilities dealing with this
> have all been changed to understand the convention.  This pretty
> much solves the problem of obnoxious users messing around with
> your terminal from elsewhere.

I have two questions about this:

(1) Why the heck is ioctl not protected?  I would think that "owner or root"
would be a darned good idea; is there something complex about this that pre-
vents protecting the ioctl() system call?

(2) This suggestion would be enhanced by (1) above, but is workable anyway;
if you can tell that you are doing an ioctl get, why not GET from fd 0 and
SET from fd 1?  This would be MUCH easier on everyone; and makes for a logical
shell syntax:

(this is v7 stty I show)

$ stty -l </dev/tty1 ; : this reads ioctl info from tty1
...
$ stty cbreak >/dev/tty1 ; : this is likely to get the guy on tty1 upset...

I can't see any problems with this way of doing it; am I missing something?

--bsa
-- 
  Brandon Allbery: decvax!cwruecmp{!atvax}!ncoast!bsa: R0176 at CSUOHIO.BITNET
   					       ^ Note name change!
	 6504 Chestnut Road, Independence, OH 44131 <> (216) 524-1416

"The more they overthink the plumbin', the easier 'tis tae stop up the drain."



More information about the Net.bugs mailing list