aboutsummaryrefslogtreecommitdiffstats
path: root/executor/common_linux.h
diff options
context:
space:
mode:
Diffstat (limited to 'executor/common_linux.h')
-rw-r--r--executor/common_linux.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/executor/common_linux.h b/executor/common_linux.h
index 1819739c5..5f3eec25f 100644
--- a/executor/common_linux.h
+++ b/executor/common_linux.h
@@ -1427,6 +1427,7 @@ static void setup_common()
#endif
#if SYZ_EXECUTOR || SYZ_SANDBOX_NONE || SYZ_SANDBOX_SETUID || SYZ_SANDBOX_NAMESPACE
+#include <sched.h>
#include <sys/prctl.h>
#include <sys/resource.h>
#include <sys/time.h>
@@ -1536,16 +1537,18 @@ static int do_sandbox_none(void)
static int do_sandbox_setuid(void)
{
- if (unshare(CLONE_NEWPID))
- fail("unshare(CLONE_NEWPID)");
+ if (unshare(CLONE_NEWPID)) {
+ debug("unshare(CLONE_NEWPID): %d\n", errno);
+ }
int pid = fork();
if (pid != 0)
return wait_for_loop(pid);
setup_common();
sandbox_common();
- if (unshare(CLONE_NEWNET))
- fail("unshare(CLONE_NEWNET)");
+ if (unshare(CLONE_NEWNET)) {
+ debug("unshare(CLONE_NEWNET): %d\n", errno);
+ }
#if SYZ_EXECUTOR || SYZ_TUN_ENABLE
initialize_tun();
#endif
@@ -1573,6 +1576,7 @@ static int do_sandbox_setuid(void)
#if SYZ_EXECUTOR || SYZ_SANDBOX_NAMESPACE
#include <linux/capability.h>
+#include <sched.h>
#include <sys/mman.h>
static int real_uid;