diff options
author | Darren Tucker <dtucker@zip.com.au> | 2004-02-24 09:20:29 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2004-02-24 09:20:29 +1100 |
commit | efa3706f053895ffa6fca255585c20e55b11f769 (patch) | |
tree | 29d55daae625af9fc0cc99b9bd5f503fdcda75a4 | |
parent | 37bd3663bf47ea977e503ce8ba75dde675a7e4b9 (diff) |
- markus@cvs.openbsd.org 2004/02/23 12:02:33
[sshd.c]
backout revision 1.279; set listen socket to non-block; ok henning.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | sshd.c | 12 |
2 files changed, 15 insertions, 2 deletions
@@ -3,6 +3,9 @@ | |||
3 | - markus@cvs.openbsd.org 2004/02/19 21:15:04 | 3 | - markus@cvs.openbsd.org 2004/02/19 21:15:04 |
4 | [sftp-server.c] | 4 | [sftp-server.c] |
5 | switch to new license.template | 5 | switch to new license.template |
6 | - markus@cvs.openbsd.org 2004/02/23 12:02:33 | ||
7 | [sshd.c] | ||
8 | backout revision 1.279; set listen socket to non-block; ok henning. | ||
6 | 9 | ||
7 | 20040223 | 10 | 20040223 |
8 | - (dtucker) [session.c] Bug #789: Only make setcred call for !privsep in the | 11 | - (dtucker) [session.c] Bug #789: Only make setcred call for !privsep in the |
@@ -1906,4 +1909,4 @@ | |||
1906 | - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. | 1909 | - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. |
1907 | Report from murple@murple.net, diagnosis from dtucker@zip.com.au | 1910 | Report from murple@murple.net, diagnosis from dtucker@zip.com.au |
1908 | 1911 | ||
1909 | $Id: ChangeLog,v 1.3244 2004/02/23 22:19:15 dtucker Exp $ | 1912 | $Id: ChangeLog,v 1.3245 2004/02/23 22:20:29 dtucker Exp $ |
@@ -42,7 +42,7 @@ | |||
42 | */ | 42 | */ |
43 | 43 | ||
44 | #include "includes.h" | 44 | #include "includes.h" |
45 | RCSID("$OpenBSD: sshd.c,v 1.285 2004/02/05 05:37:17 dtucker Exp $"); | 45 | RCSID("$OpenBSD: sshd.c,v 1.286 2004/02/23 12:02:33 markus Exp $"); |
46 | 46 | ||
47 | #include <openssl/dh.h> | 47 | #include <openssl/dh.h> |
48 | #include <openssl/bn.h> | 48 | #include <openssl/bn.h> |
@@ -1151,6 +1151,11 @@ main(int ac, char **av) | |||
1151 | verbose("socket: %.100s", strerror(errno)); | 1151 | verbose("socket: %.100s", strerror(errno)); |
1152 | continue; | 1152 | continue; |
1153 | } | 1153 | } |
1154 | if (fcntl(listen_sock, F_SETFL, O_NONBLOCK) < 0) { | ||
1155 | error("listen_sock O_NONBLOCK: %s", strerror(errno)); | ||
1156 | close(listen_sock); | ||
1157 | continue; | ||
1158 | } | ||
1154 | /* | 1159 | /* |
1155 | * Set socket options. | 1160 | * Set socket options. |
1156 | * Allow local port reuse in TIME_WAIT. | 1161 | * Allow local port reuse in TIME_WAIT. |
@@ -1290,6 +1295,11 @@ main(int ac, char **av) | |||
1290 | error("accept: %.100s", strerror(errno)); | 1295 | error("accept: %.100s", strerror(errno)); |
1291 | continue; | 1296 | continue; |
1292 | } | 1297 | } |
1298 | if (fcntl(newsock, F_SETFL, 0) < 0) { | ||
1299 | error("newsock del O_NONBLOCK: %s", strerror(errno)); | ||
1300 | close(newsock); | ||
1301 | continue; | ||
1302 | } | ||
1293 | if (drop_connection(startups) == 1) { | 1303 | if (drop_connection(startups) == 1) { |
1294 | debug("drop connection #%d", startups); | 1304 | debug("drop connection #%d", startups); |
1295 | close(newsock); | 1305 | close(newsock); |