mirror of
https://github.com/reactos/syzkaller.git
synced 2025-02-21 03:50:31 +00:00
executor: fix pid check after fork
This commit is contained in:
parent
5adb8b7437
commit
346edcb763
@ -1218,7 +1218,7 @@ static int do_sandbox_none(void)
|
||||
debug("unshare(CLONE_NEWPID): %d\n", errno);
|
||||
}
|
||||
int pid = fork();
|
||||
if (pid <= 0)
|
||||
if (pid != 0)
|
||||
return wait_for_loop(pid);
|
||||
|
||||
#if defined(SYZ_EXECUTOR) || defined(SYZ_ENABLE_CGROUPS)
|
||||
@ -1246,7 +1246,7 @@ static int do_sandbox_setuid(void)
|
||||
if (unshare(CLONE_NEWPID))
|
||||
fail("unshare(CLONE_NEWPID)");
|
||||
int pid = fork();
|
||||
if (pid <= 0)
|
||||
if (pid != 0)
|
||||
return wait_for_loop(pid);
|
||||
|
||||
#if defined(SYZ_EXECUTOR) || defined(SYZ_ENABLE_CGROUPS)
|
||||
|
@ -2251,7 +2251,7 @@ static int do_sandbox_none(void)
|
||||
debug("unshare(CLONE_NEWPID): %d\n", errno);
|
||||
}
|
||||
int pid = fork();
|
||||
if (pid <= 0)
|
||||
if (pid != 0)
|
||||
return wait_for_loop(pid);
|
||||
|
||||
#if defined(SYZ_EXECUTOR) || defined(SYZ_ENABLE_CGROUPS)
|
||||
@ -2279,7 +2279,7 @@ static int do_sandbox_setuid(void)
|
||||
if (unshare(CLONE_NEWPID))
|
||||
fail("unshare(CLONE_NEWPID)");
|
||||
int pid = fork();
|
||||
if (pid <= 0)
|
||||
if (pid != 0)
|
||||
return wait_for_loop(pid);
|
||||
|
||||
#if defined(SYZ_EXECUTOR) || defined(SYZ_ENABLE_CGROUPS)
|
||||
|
Loading…
x
Reference in New Issue
Block a user