X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fsyscall_setnamespace-v13.hc;h=dd1bf88576247da2ca65fb52c4dda060fb8462fd;hb=b4337f04ada982a3e2d6e49f6929916023e868a1;hp=cda4c1a922e95c3310d046b1a07073cacc53a55d;hpb=5c131b100a04dc1e2c5e27f047ca04952aeb9cc2;p=util-vserver.git diff --git a/lib/syscall_setnamespace-v13.hc b/lib/syscall_setnamespace-v13.hc index cda4c1a..dd1bf88 100644 --- a/lib/syscall_setnamespace-v13.hc +++ b/lib/syscall_setnamespace-v13.hc @@ -23,7 +23,13 @@ #include "vserver.h" static inline ALWAYSINLINE int -vc_set_namespace_v13(int UNUSED tmp) +vc_set_namespace_v13(xid_t xid, uint_least64_t mask, uint32_t index) { - return vserver(VCMD_set_namespace_v0, -1, 0); + if ((mask & (CLONE_NEWNS|CLONE_FS)) == 0) + return 0; + if (index != 0) { + errno = EINVAL; + return -1; + } + return vserver(VCMD_set_space_v0, CTX_USER2KERNEL(xid), 0); }