No SIGHUP on carrier loss

Al Filipski al at mot.UUCP
Tue Apr 9 10:18:00 AEST 1985


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?



More information about the Comp.unix.wizards mailing list