- markus@cvs.openbsd.org 2004/02/23 12:02:33
[sshd.c] backout revision 1.279; set listen socket to non-block; ok henning.
This commit is contained in:
parent
37bd3663bf
commit
efa3706f05
|
@ -3,6 +3,9 @@
|
|||
- markus@cvs.openbsd.org 2004/02/19 21:15:04
|
||||
[sftp-server.c]
|
||||
switch to new license.template
|
||||
- markus@cvs.openbsd.org 2004/02/23 12:02:33
|
||||
[sshd.c]
|
||||
backout revision 1.279; set listen socket to non-block; ok henning.
|
||||
|
||||
20040223
|
||||
- (dtucker) [session.c] Bug #789: Only make setcred call for !privsep in the
|
||||
|
@ -1906,4 +1909,4 @@
|
|||
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
|
||||
Report from murple@murple.net, diagnosis from dtucker@zip.com.au
|
||||
|
||||
$Id: ChangeLog,v 1.3244 2004/02/23 22:19:15 dtucker Exp $
|
||||
$Id: ChangeLog,v 1.3245 2004/02/23 22:20:29 dtucker Exp $
|
||||
|
|
12
sshd.c
12
sshd.c
|
@ -42,7 +42,7 @@
|
|||
*/
|
||||
|
||||
#include "includes.h"
|
||||
RCSID("$OpenBSD: sshd.c,v 1.285 2004/02/05 05:37:17 dtucker Exp $");
|
||||
RCSID("$OpenBSD: sshd.c,v 1.286 2004/02/23 12:02:33 markus Exp $");
|
||||
|
||||
#include <openssl/dh.h>
|
||||
#include <openssl/bn.h>
|
||||
|
@ -1151,6 +1151,11 @@ main(int ac, char **av)
|
|||
verbose("socket: %.100s", strerror(errno));
|
||||
continue;
|
||||
}
|
||||
if (fcntl(listen_sock, F_SETFL, O_NONBLOCK) < 0) {
|
||||
error("listen_sock O_NONBLOCK: %s", strerror(errno));
|
||||
close(listen_sock);
|
||||
continue;
|
||||
}
|
||||
/*
|
||||
* Set socket options.
|
||||
* Allow local port reuse in TIME_WAIT.
|
||||
|
@ -1290,6 +1295,11 @@ main(int ac, char **av)
|
|||
error("accept: %.100s", strerror(errno));
|
||||
continue;
|
||||
}
|
||||
if (fcntl(newsock, F_SETFL, 0) < 0) {
|
||||
error("newsock del O_NONBLOCK: %s", strerror(errno));
|
||||
close(newsock);
|
||||
continue;
|
||||
}
|
||||
if (drop_connection(startups) == 1) {
|
||||
debug("drop connection #%d", startups);
|
||||
close(newsock);
|
||||
|
|
Loading…
Reference in New Issue