X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fsyscall_ctxcreate-v21.hc;h=3fb2f568f80b7fb058c78e1149da48f6ff5d27c5;hb=5bf2e1fcf4cc953116f5b50f9292231e2a25cfec;hp=600c9ef738103e47fa53feae21791258addc823a;hpb=070c3799b792033eb4ef79ab0de03ebde6feb200;p=util-vserver.git diff --git a/lib/syscall_ctxcreate-v21.hc b/lib/syscall_ctxcreate-v21.hc index 600c9ef..3fb2f56 100644 --- a/lib/syscall_ctxcreate-v21.hc +++ b/lib/syscall_ctxcreate-v21.hc @@ -33,13 +33,14 @@ vc_ctx_create_v21(xid_t xid, struct vc_ctx_flags *flags) if (flags) data.flagword = flags->flagword & flags->mask; - res = vserver(VCMD_ctx_create, CTX_USER2KERNEL(xid), &data); + res = vserver(VCMD_ctx_create_v1, CTX_USER2KERNEL(xid), &data); res = CTX_KERNEL2USER(res); if (res != VC_NOCTX) { if (utilvserver_checkCompatConfig() & VC_VCI_SPACES) { - sys_unshare(CLONE_NEWUTS | CLONE_NEWIPC); - vc_set_namespace(VC_SAMECTX, CLONE_NEWUTS | CLONE_NEWIPC); + uint32_t spaces = vc_get_space_mask() & ~(CLONE_NEWNS|CLONE_FS); + sys_unshare(spaces); + vc_set_namespace(VC_SAMECTX, spaces); } }