[openssh-commits] [openssh] 01/01: wrap getrlimit call in HAVE_GETRLIMIT; bz3291
git+noreply at mindrot.org
git+noreply at mindrot.org
Wed Apr 7 08:21:18 AEST 2021
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit f283a6c2e0a9bd9369e18462acd00be56fbe5b0d
Author: Damien Miller <djm at mindrot.org>
Date: Wed Apr 7 08:20:35 2021 +1000
wrap getrlimit call in HAVE_GETRLIMIT; bz3291
---
sftp-server.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sftp-server.c b/sftp-server.c
index cce52dbc..1f9997bd 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");
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list