diff options
author | Damien Miller <djm@mindrot.org> | 2021-04-07 00:20:35 +0200 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2021-04-07 00:20:59 +0200 |
commit | f283a6c2e0a9bd9369e18462acd00be56fbe5b0d (patch) | |
tree | b77aac9700a2467698a49d44b929d5fd74c0863e /sftp-server.c | |
parent | upstream: Don't check return value of unsetenv(). It's part of the (diff) | |
download | openssh-f283a6c2e0a9bd9369e18462acd00be56fbe5b0d.tar.xz openssh-f283a6c2e0a9bd9369e18462acd00be56fbe5b0d.zip |
wrap getrlimit call in HAVE_GETRLIMIT; bz3291
Diffstat (limited to 'sftp-server.c')
-rw-r--r-- | sftp-server.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sftp-server.c b/sftp-server.c index cce52dbc2..1f9997bde 100644 --- a/sftp-server.c +++ b/sftp-server.c @@ -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"); |