summaryrefslogtreecommitdiff
path: root/sandbox-rlimit.c
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox-rlimit.c')
-rw-r--r--sandbox-rlimit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sandbox-rlimit.c b/sandbox-rlimit.c
index a00386337..bba80778b 100644
--- a/sandbox-rlimit.c
+++ b/sandbox-rlimit.c
@@ -42,7 +42,7 @@ struct ssh_sandbox {
42}; 42};
43 43
44struct ssh_sandbox * 44struct ssh_sandbox *
45ssh_sandbox_init(void) 45ssh_sandbox_init(struct monitor *monitor)
46{ 46{
47 struct ssh_sandbox *box; 47 struct ssh_sandbox *box;
48 48
@@ -69,9 +69,11 @@ ssh_sandbox_child(struct ssh_sandbox *box)
69 fatal("%s: setrlimit(RLIMIT_FSIZE, { 0, 0 }): %s", 69 fatal("%s: setrlimit(RLIMIT_FSIZE, { 0, 0 }): %s",
70 __func__, strerror(errno)); 70 __func__, strerror(errno));
71#endif 71#endif
72#ifndef SANDBOX_SKIP_RLIMIT_NOFILE
72 if (setrlimit(RLIMIT_NOFILE, &rl_zero) == -1) 73 if (setrlimit(RLIMIT_NOFILE, &rl_zero) == -1)
73 fatal("%s: setrlimit(RLIMIT_NOFILE, { 0, 0 }): %s", 74 fatal("%s: setrlimit(RLIMIT_NOFILE, { 0, 0 }): %s",
74 __func__, strerror(errno)); 75 __func__, strerror(errno));
76#endif
75#ifdef HAVE_RLIMIT_NPROC 77#ifdef HAVE_RLIMIT_NPROC
76 if (setrlimit(RLIMIT_NPROC, &rl_zero) == -1) 78 if (setrlimit(RLIMIT_NPROC, &rl_zero) == -1)
77 fatal("%s: setrlimit(RLIMIT_NPROC, { 0, 0 }): %s", 79 fatal("%s: setrlimit(RLIMIT_NPROC, { 0, 0 }): %s",