	
		9) Connection Failure Leaves Line Open, Locked


From: teklabs!harpo!floyd!cmcl2!salkind
Date: Mon Mar 22 16:53:06 1982
Subject: uucp bug
Newsgroups: net.bugs.4bsd,net.bugs.v7
References: conn.c

In conn.c, if you fail to login to a machine, the (dialout) line file
descriptor will not be closed.  Therefore the next open on the line will
fail (because the line is set for exclusive access).

This problem can show up if you execute (not as root)
	uucico -r1

The fix is a one line addition to the routine login():


*** conn.c	Mon Mar 22 16:25:50 1982
--- conn.c.old	Mon Mar 22 16:27:42 1982
***************
*** 531,537
  				break;
  			if (altern == NULL) {
  				logent("LOGIN", "FAILED");
- 				close(fn);
  				return(FAIL);
  			}
  			want = index(altern, '-');

--- 531,536 -----
  				break;
  			if (altern == NULL) {
  				logent("LOGIN", "FAILED");
  				return(FAIL);
  			}
  			want = index(altern, '-');


________

						Lou Salkind
						cmcl2!salkind


