From 489c33b24d7191ab5fbd9be8814a91a110e51d38 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sun, 23 Nov 2003 23:17:35 +0000 Subject: from portable - use sysconf to detect fd limit; ok markus@ --- usr.bin/ssh/ssh-keyscan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.bin') 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 #include @@ -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; } -- cgit v1.2.3