summaryrefslogtreecommitdiff
path: root/sandbox-rlimit.c
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox-rlimit.c')
-rw-r--r--sandbox-rlimit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sandbox-rlimit.c b/sandbox-rlimit.c
index da91eb1b..bba80778 100644
--- a/sandbox-rlimit.c
+++ b/sandbox-rlimit.c
@@ -69,9 +69,11 @@ ssh_sandbox_child(struct ssh_sandbox *box)
fatal("%s: setrlimit(RLIMIT_FSIZE, { 0, 0 }): %s",
__func__, strerror(errno));
#endif
+#ifndef SANDBOX_SKIP_RLIMIT_NOFILE
if (setrlimit(RLIMIT_NOFILE, &rl_zero) == -1)
fatal("%s: setrlimit(RLIMIT_NOFILE, { 0, 0 }): %s",
__func__, strerror(errno));
+#endif
#ifdef HAVE_RLIMIT_NPROC
if (setrlimit(RLIMIT_NPROC, &rl_zero) == -1)
fatal("%s: setrlimit(RLIMIT_NPROC, { 0, 0 }): %s",