aboutsummaryrefslogtreecommitdiffstats
path: root/csource
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-05-25 12:40:06 +0200
committerDmitry Vyukov <dvyukov@google.com>2017-05-25 12:40:06 +0200
commita2ef63b51f2efd9213f410577d07dead25a0f85f (patch)
tree8d496fc9d5ec9efd48b88aa680c7c350e999e3a5 /csource
parentffb5c7319ebc92b08d3600c6873942276577dba6 (diff)
csource: regenerate
Diffstat (limited to 'csource')
-rw-r--r--csource/common.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/csource/common.go b/csource/common.go
index 2551cbbb9..bceb3907d 100644
--- a/csource/common.go
+++ b/csource/common.go
@@ -1473,6 +1473,8 @@ static int do_sandbox_setuid(int executor_pid, bool enable_tun)
if (syscall(SYS_setresuid, nobody, nobody, nobody))
fail("failed to setresuid");
+ prctl(PR_SET_DUMPABLE, 1, 0, 0, 0);
+
loop();
doexit(1);
}
@@ -1530,6 +1532,10 @@ static int namespace_sandbox_proc(void* arg)
fail("mkdir failed");
if (mount("/dev", "./syz-tmp/newroot/dev", NULL, MS_BIND | MS_REC | MS_PRIVATE, NULL))
fail("mount(dev) failed");
+ if (mkdir("./syz-tmp/newroot/proc", 0700))
+ fail("mkdir failed");
+ if (mount(NULL, "./syz-tmp/newroot/proc", "proc", 0, NULL))
+ fail("mount(proc) failed");
if (mkdir("./syz-tmp/pivot", 0777))
fail("mkdir failed");
if (syscall(SYS_pivot_root, "./syz-tmp", "./syz-tmp/pivot")) {