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 --- pkg/csource/linux_common.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'pkg/csource/linux_common.go') diff --git a/pkg/csource/linux_common.go b/pkg/csource/linux_common.go index 4d3a2b820..cff255a1b 100644 --- a/pkg/csource/linux_common.go +++ b/pkg/csource/linux_common.go @@ -1921,13 +1921,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