summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2003-11-23 23:17:35 +0000
committerDamien Miller <djm@cvs.openbsd.org>2003-11-23 23:17:35 +0000
commit489c33b24d7191ab5fbd9be8814a91a110e51d38 (patch)
tree66d01fdd6b215ccf61fa6cbfb6177de66671309f /usr.bin
parentc8e6993ef3544a8df360d2edf2f1c09067d425c9 (diff)
from portable - use sysconf to detect fd limit; ok markus@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/ssh-keyscan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/ssh-keyscan.c b/usr.bin/ssh/ssh-keyscan.c
index 4fc962063c4..348bc3a6d29 100644
--- a/usr.bin/ssh/ssh-keyscan.c
+++ b/usr.bin/ssh/ssh-keyscan.c
@@ -7,7 +7,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh-keyscan.c,v 1.45 2003/09/19 11:30:39 markus Exp $");
+RCSID("$OpenBSD: ssh-keyscan.c,v 1.46 2003/11/23 23:17:34 djm Exp $");
#include <sys/queue.h>
#include <errno.h>
@@ -210,7 +210,7 @@ fdlim_get(int hard)
if (getrlimit(RLIMIT_NOFILE, &rlfd) < 0)
return (-1);
if ((hard ? rlfd.rlim_max : rlfd.rlim_cur) == RLIM_INFINITY)
- return 10000;
+ return sysconf(_SC_OPEN_MAX);
else
return hard ? rlfd.rlim_max : rlfd.rlim_cur;
}