BSD tty security, part 4: What You Can Look Forward To

Karl Denninger kdenning at genesis.Naitc.Com
Wed May 1 14:51:40 AEST 1991


In article <1991Apr30.231235.7874 at mp.cs.niu.edu> rickert at mp.cs.niu.edu (Neil Rickert) writes:
>In article <1991Apr30.224740.17040 at pcserver2.naitc.com> kdenning at pcserver2.naitc.com (Karl Denninger) writes:
>>
>>The most obvious attempts, taking over "unused" ptys slave ends, result in
>>the system skipping them when assignment time comes around.  This prevents
>>
>>The RS/6000 dynamically creates ptys, and thus doesn't suffer from the
>>problem at all.
>
> And what exactly is there to stop somebody running a daemon which grabs
>access to a pty immediately after it has been assigned, or immediately
>after it has been dynamically created, but before public write access has
>been turned off.

Well, one could open it with O_EXCL turned on.  One and only ONE process can
get to that pty until it releases the exclusive flag.  The process can do
that well after it's turned off public write access.

Heck, leave it set exclusive.  Most things that have to open a terminal 
again would use /dev/tty, which shouldn't get in trouble with this scheme.

If that is implemented for ptys, that should fit the requirement nicely.

-- 
Karl Denninger - AC Nielsen, Bannockburn IL (708) 317-3285
kdenning at nis.naitc.com

"The most dangerous command on any computer is the carriage return."
Disclaimer:  The opinions here are solely mine and may or may not reflect
  	     those of the company.



More information about the Comp.unix.wizards mailing list