diff options
Diffstat (limited to 'ssh-keyscan.c')
-rw-r--r-- | ssh-keyscan.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/ssh-keyscan.c b/ssh-keyscan.c index 9506ec196..04d43da35 100644 --- a/ssh-keyscan.c +++ b/ssh-keyscan.c | |||
@@ -214,13 +214,11 @@ fdlim_get(int hard) | |||
214 | if (getrlimit(RLIMIT_NOFILE, &rlfd) < 0) | 214 | if (getrlimit(RLIMIT_NOFILE, &rlfd) < 0) |
215 | return (-1); | 215 | return (-1); |
216 | if ((hard ? rlfd.rlim_max : rlfd.rlim_cur) == RLIM_INFINITY) | 216 | if ((hard ? rlfd.rlim_max : rlfd.rlim_cur) == RLIM_INFINITY) |
217 | return 10000; | 217 | return SSH_SYSFDMAX; |
218 | else | 218 | else |
219 | return hard ? rlfd.rlim_max : rlfd.rlim_cur; | 219 | return hard ? rlfd.rlim_max : rlfd.rlim_cur; |
220 | #elif defined (HAVE_SYSCONF) | ||
221 | return sysconf (_SC_OPEN_MAX); | ||
222 | #else | 220 | #else |
223 | return 10000; | 221 | return SSH_SYSFDMAX; |
224 | #endif | 222 | #endif |
225 | } | 223 | } |
226 | 224 | ||