home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.ultrix
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!munnari.oz.au!bruce.cs.monash.edu.au!monu6!dibbler.cs.monash.edu.au!tym
- From: tym@dibbler.cs.monash.edu.au (Tim MacKenzie)
- Subject: Re: problem with rlogind from mjr's bsd-login
- Message-ID: <1992Nov6.020313.18631@monu6.cc.monash.edu.au>
- Sender: news@monu6.cc.monash.edu.au (Usenet system)
- Organization: Computer Science, Monash University, Australia
- X-Newsreader: TIN [version 1.1 PL6]
- References: <1992Nov4.001002.9128@colorado.edu>
- Date: Fri, 6 Nov 1992 02:03:13 GMT
- Lines: 35
-
- Todd C. Miller (millert@nordsieck.cs.Colorado.EDU) wrote:
- >In article <1992Nov3.235004.8649@colorado.edu> millert@nordsieck.cs.Colorado.EDU (Todd C. Miller) writes:
- >>I'm running ultrix 4.2a and just installed mjr's bsd-login. Now I find that
- >>when I rlogin to the machine, I cannot open /dev/tty:
- >> nordsieck [~] % echo foo | cat > /dev/tty
- >> /dev/tty: No such device or address.
- >incidentally, this doesn't happen when I telnet in, so I naturally suspect
- >rlogind :-)
-
- I queried mjr about this one a couple of months ago (he didn't have a fix).
- I do get the problem with both rlogind and telnetd incidentally.
-
- I tracked the problem down just last week. It is in the code that tries to
- clean up the terminal by doing a vhangup. The approximate sequence of events
- is:
- 1) find a pty that we can have.
- 2) Disassociate ourself from our current controlling terminal (just in case)
- 3) open(2) the tty: this makes that tty our controlling terminal.
- 4) ignore HUP, vhangup(). This dumps all file descriptors that refer to the
- tty's inode (and loses our current connection to the terminal).
- 5) open(2) the tty again.
-
- The final step should make the terminal our controlling terminal, thus making
- it possible to use /dev/tty and making 'ps' show the terminal that a process
- is on.
-
- It seems that Ultrix is preventing you from gaining a controlling terminal
- once you have had controlling terminal that was vhangup'd. Could someone at
- DEC please confirm this: it is _not_ in any of the relevant man pages.
-
- My current solution is to dump steps 4 and 5 from the rlogind and telnetd.
- I'm not sure if this opens a security hole, (could anyone advise?) but it
- does work!
- --
- -Tim MacKenzie (tym@dibbler.cs.monash.edu.au)
-