From d545a4b9749fef6613b556b2191f6cb898fcb60f Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Tue, 3 Jul 2012 22:48:31 +1000 Subject: - (dtucker) [configure.ac sandbox-rlimit.c] Test whether or not setrlimit(RLIMIT_FSIZE, rl_zero) and skip it if it's not supported. Its benefit is minor, so it's not worth disabling the sandbox if it doesn't work. --- sandbox-rlimit.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sandbox-rlimit.c') diff --git a/sandbox-rlimit.c b/sandbox-rlimit.c index 761e9284..a0038633 100644 --- a/sandbox-rlimit.c +++ b/sandbox-rlimit.c @@ -64,9 +64,11 @@ ssh_sandbox_child(struct ssh_sandbox *box) rl_zero.rlim_cur = rl_zero.rlim_max = 0; +#ifndef SANDBOX_SKIP_RLIMIT_FSIZE if (setrlimit(RLIMIT_FSIZE, &rl_zero) == -1) fatal("%s: setrlimit(RLIMIT_FSIZE, { 0, 0 }): %s", __func__, strerror(errno)); +#endif if (setrlimit(RLIMIT_NOFILE, &rl_zero) == -1) fatal("%s: setrlimit(RLIMIT_NOFILE, { 0, 0 }): %s", __func__, strerror(errno)); -- cgit v1.2.1