X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fsyscall_ctxcreate-v21.hc;h=3fb2f568f80b7fb058c78e1149da48f6ff5d27c5;hb=3b54486e6eff7f10185e0f43234403b0fc2dd048;hp=91e145b6526c2c539bdc72055acee3da8229d13e;hpb=a6be71d3e49f0f633705ba5e4e08cc1cac811344;p=util-vserver.git diff --git a/lib/syscall_ctxcreate-v21.hc b/lib/syscall_ctxcreate-v21.hc index 91e145b..3fb2f56 100644 --- a/lib/syscall_ctxcreate-v21.hc +++ b/lib/syscall_ctxcreate-v21.hc @@ -33,12 +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); + uint32_t spaces = vc_get_space_mask() & ~(CLONE_NEWNS|CLONE_FS); + sys_unshare(spaces); + vc_set_namespace(VC_SAMECTX, spaces); } }