From: Martin Mares Date: Sat, 28 Mar 2009 16:05:55 +0000 (+0100) Subject: Sandbox: call setup_environment() before enabling syscall tracing X-Git-Tag: python-dummy-working~111 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=104f98ec2f251d9e1f6a63745f3b62286796b031;p=moe.git Sandbox: call setup_environment() before enabling syscall tracing --- diff --git a/box/box.c b/box/box.c index ca2a292..da7dfc1 100644 --- a/box/box.c +++ b/box/box.c @@ -1001,6 +1001,7 @@ box_inside(int argc, char **argv) rl.rlim_cur = rl.rlim_max = 64; if (setrlimit(RLIMIT_NOFILE, &rl) < 0) die("setrlimit: %m"); + char **env = setup_environment(); if (filter_syscalls) { if (ptrace(PTRACE_TRACEME) < 0) @@ -1009,7 +1010,7 @@ box_inside(int argc, char **argv) signal(SIGCHLD, SIG_IGN); raise(SIGCHLD); } - execve(args[0], args, setup_environment()); + execve(args[0], args, env); die("execve(\"%s\"): %m", args[0]); }