summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--sshd.c7
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 7cc597586..f58907574 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -25,6 +25,10 @@
25 [auth.c] 25 [auth.c]
26 Support "none" as an argument for AuthorizedPrincipalsFile to indicate 26 Support "none" as an argument for AuthorizedPrincipalsFile to indicate
27 no file should be read. 27 no file should be read.
28 - djm@cvs.openbsd.org 2012/04/11 13:26:40
29 [sshd.c]
30 don't spin in accept() when out of fds (ENFILE/ENFILE) - back off for a
31 while; ok deraadt@ markus@
28 32
2920120420 3320120420
30 - (djm) [contrib/caldera/openssh.spec contrib/redhat/openssh.spec] 34 - (djm) [contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
diff --git a/sshd.c b/sshd.c
index b63aaa428..fddbc9d37 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshd.c,v 1.388 2011/09/30 21:22:49 djm Exp $ */ 1/* $OpenBSD: sshd.c,v 1.389 2012/04/11 13:26:40 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1174,7 +1174,10 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s)
1174 if (*newsock < 0) { 1174 if (*newsock < 0) {
1175 if (errno != EINTR && errno != EAGAIN && 1175 if (errno != EINTR && errno != EAGAIN &&
1176 errno != EWOULDBLOCK) 1176 errno != EWOULDBLOCK)
1177 error("accept: %.100s", strerror(errno)); 1177 error("accept: %.100s",
1178 strerror(errno));
1179 if (errno == EMFILE || errno == ENFILE)
1180 usleep(100 * 1000);
1178 continue; 1181 continue;
1179 } 1182 }
1180 if (unset_nonblock(*newsock) == -1) { 1183 if (unset_nonblock(*newsock) == -1) {