Commit 89675247 authored by Andrei Vagin's avatar Andrei Vagin Committed by Pavel Emelyanov

zdtm: don't exclude ipc and uts namespaces in case of userns

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent c7bc3655
...@@ -400,17 +400,12 @@ void ns_create(int argc, char **argv) ...@@ -400,17 +400,12 @@ void ns_create(int argc, char **argv)
exit(1); exit(1);
} }
flags = CLONE_NEWPID | CLONE_NEWNS | CLONE_NEWUTS |
CLONE_NEWNET | CLONE_NEWIPC | SIGCHLD;
val = getenv("ZDTM_USERNS"); val = getenv("ZDTM_USERNS");
if (val) if (val)
/* flags |= CLONE_NEWUSER;
* CLONE_NEWIPC and CLONE_NEWUTS are excluded, because
* their sysctl-s are protected by CAP_SYS_ADMIN
*/
flags = CLONE_NEWPID | CLONE_NEWNS |
CLONE_NEWNET | CLONE_NEWUSER | SIGCHLD;
else
flags = CLONE_NEWPID | CLONE_NEWNS | CLONE_NEWUTS |
CLONE_NEWNET | CLONE_NEWIPC | SIGCHLD;
if (construct_root()) if (construct_root())
exit(1); exit(1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment