Xref: utzoo comp.unix.wizards:25526 alt.security:2508 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!sdd.hp.com!cs.utexas.edu!chinacat!sequoia!rpp386!jfh From: jfh@rpp386.cactus.org (John F Haugh II) Newsgroups: comp.unix.wizards,alt.security Subject: Re: BSD tty security, part 3: How to Fix It Message-ID: <19254@rpp386.cactus.org> Date: 10 May 91 12:16:21 GMT References: <17916:May522:46:2091@kramden.acf.nyu.edu> <19250@rpp386.cactus.org> <29117:May621:05:1391@kramden.acf.nyu.edu> Reply-To: jfh@rpp386.cactus.org (John F Haugh II) Organization: Lone Star Cat Emporium and BBQ Grill Lines: 30 X-Clever-Slogan: Help Prevent Robbery. Tax the IRS. In article <29117:May621:05:1391@kramden.acf.nyu.edu> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes: >Yeah, I think you can make vhangup() chop /dev/tty without races if you >change u_ttyd to p_ttyd throughout, fix all your process-status programs >so that they don't crash with this change, and add some lines inside the >vhangup() syscall. That doesn't do anything about current operations. Like I said, the current operations can be fixed by finding all the places that sleep waiting for an I/O operation to complete. Add a generation number or some such to the tty structure. Save your generation number before sleeping, and if they match when you wake up, you win the prize. There are zillions of ways to solve this problem. >> How about fixing that problem instead of creating another >> hack? > >``Creating another hack''? Sheesh. The entire idea of having a separate >tty security mechanism is a hack. /dev/tty represents an alternate >method of file access, and as such makes security a whole lot more >complicated than when there was only open(). That's the problem that >/dev/stdtty fixes. That's utter nonsense. AIX supports /dev/tty and tty device revocation, and the code to support both is no big deal. It even manages to get access via /dev/tty correct ... -- John F. Haugh II | Distribution to | UUCP: ...!cs.utexas.edu!rpp386!jfh Ma Bell: (512) 255-8251 | GEnie PROHIBITED :-) | Domain: jfh@rpp386.cactus.org "If liberals interpreted the 2nd Amendment the same way they interpret the rest of the Constitution, gun ownership would be mandatory."