mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-30 09:14:59 +02:00
wrap getrlimit call in HAVE_GETRLIMIT; bz3291
This commit is contained in:
parent
679bdc4a5c
commit
f283a6c2e0
@ -1495,8 +1495,10 @@ process_extended_limits(u_int32_t id)
|
||||
|
||||
debug("request %u: limits", id);
|
||||
|
||||
#ifdef HAVE_GETRLIMIT
|
||||
if (getrlimit(RLIMIT_NOFILE, &rlim) != -1 && rlim.rlim_cur > 5)
|
||||
nfiles = rlim.rlim_cur - 5; /* stdio(3) + syslog + spare */
|
||||
#endif
|
||||
|
||||
if ((msg = sshbuf_new()) == NULL)
|
||||
fatal_f("sshbuf_new failed");
|
||||
|
Loading…
x
Reference in New Issue
Block a user