al@mot.UUCP (Al Filipski) (04/09/85)
Here's the scenario: During an interactive session over a phone line under UNIX, the user hangs up (in the telephone sense) the line. The next person to dial in over that line (say, 10 seconds later) finds himself connected to the abandoned session where the first user left off. This has happened to me on VAXen under both SV and 4.1 BSD. (I'm not sure exactly what the serial hardware was, either DZ11 or KMC11. Also, although I didn't check it at the time, I have no reason to believe CLOCAL was set). On one occasion I was taking a course at a University and when I dialed up, I found myself logged in as the instructor of the course. This is a security problem to say the least-- Especially since the System V User's manual (Intro, p.5) recommends hanging up as a way of terminating a session. I looked at the code of some serial drivers, and there appears to be an attempt to detect a loss of carrier on a tty line's modem (both at interrupt and periodic scan) and to post a SIGHUP to that tty's family of processes. It seems to me though, that the SIGHUP sometimes fails to get posted. Anybody know what causes this? -------------------------------- Alan Filipski, UNIX group, Motorola Microsystems, Tempe, AZ U.S.A {allegra|ihnp4}!sftig!mot!al OR {seismo|ihnp4}!ut-sally!oakhill!mot!al ucbvax!arizona!asuvax!mot!al -------------------------------- Are we having fun yet, Zippy?
dave@lsuc.UUCP (David Sherman) (04/10/85)
In article <135@mot.UUCP> al@mot.UUCP (Al Filipski) writes: || ||Here's the scenario: During an interactive session over a phone ||line under UNIX, the user hangs up (in the telephone sense) the line. ||The next person to dial in over that line (say, 10 seconds later) finds ||himself connected to the abandoned session where the first user ||left off. You have to check that your modem is configured to drop carrier detect (CXR) when carrier is lost. Then make sure your driver picks up a loss of CXR and sends a hangup signal to the UNIX process. Dave Sherman The Law Society of Upper Canada Toronto -- {utzoo pesnta nrcaero utcs hcr}!lsuc!dave {allegra decvax ihnp4 linus}!utcsri!lsuc!dave