From b7f99b54aef0b9663286a56f268f7c0833391265 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 18 Jan 2018 17:27:27 +0100 Subject: sys/linux: more selinux descriptions --- executor/common_linux.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'executor/common_linux.h') diff --git a/executor/common_linux.h b/executor/common_linux.h index 3e84f333e..8b8a5c3f8 100644 --- a/executor/common_linux.h +++ b/executor/common_linux.h @@ -873,13 +873,18 @@ static int namespace_sandbox_proc(void* arg) fail("mkdir failed"); if (mount(NULL, "./syz-tmp/newroot/proc", "proc", 0, NULL)) fail("mount(proc) failed"); + if (mkdir("./syz-tmp/newroot/selinux", 0700)) + fail("mkdir failed"); + if (mount("/selinux", "./syz-tmp/newroot/selinux", NULL, MS_BIND | MS_REC | MS_PRIVATE, NULL)) + fail("mount(selinuxfs) failed"); if (mkdir("./syz-tmp/pivot", 0777)) fail("mkdir failed"); if (syscall(SYS_pivot_root, "./syz-tmp", "./syz-tmp/pivot")) { - debug("pivot_root failed"); + debug("pivot_root failed\n"); if (chdir("./syz-tmp")) fail("chdir failed"); } else { + debug("pivot_root OK\n"); if (chdir("/")) fail("chdir failed"); if (umount2("./pivot", MNT_DETACH)) -- cgit mrf-deployment