X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fsyscall_ctxcreate-v21.hc;h=20e74623be7fe6068a61cc88e5528cbec06b121e;hb=7b75e3a056eb1b4e08bf98342248096d88a57f4f;hp=91e145b6526c2c539bdc72055acee3da8229d13e;hpb=a6be71d3e49f0f633705ba5e4e08cc1cac811344;p=util-vserver.git diff --git a/lib/syscall_ctxcreate-v21.hc b/lib/syscall_ctxcreate-v21.hc index 91e145b..20e7462 100644 --- a/lib/syscall_ctxcreate-v21.hc +++ b/lib/syscall_ctxcreate-v21.hc @@ -38,7 +38,9 @@ vc_ctx_create_v21(xid_t xid, struct vc_ctx_flags *flags) 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); } }