X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=util-vserver%2Flib%2Fsyscall-compat.hc;h=fb07d4df4cca6882f06d1badf0eaded019b08e62;hb=77d217fe688830898ca2b89ebca32fc30aab0741;hp=899932b9dc4b8fa11eec0a2f6f15d78d5e2dd4d1;hpb=9ce6c13ee8f8c304273fbbdef2e6fc6b3b038826;p=util-vserver.git diff --git a/util-vserver/lib/syscall-compat.hc b/util-vserver/lib/syscall-compat.hc index 899932b..fb07d4d 100644 --- a/util-vserver/lib/syscall-compat.hc +++ b/util-vserver/lib/syscall-compat.hc @@ -19,30 +19,29 @@ #ifdef HAVE_CONFIG_H # include #endif - #include "compat.h" + +#include "safechroot-internal.hc" + #include "vserver.h" #include "vserver-internal.h" #include static inline ALWAYSINLINE int -vc_new_s_context_compat(ctx_t ctx, unsigned int remove_cap, unsigned int flags) +vc_new_s_context_compat(xid_t ctx, unsigned int remove_cap, unsigned int flags) { - struct vcmd_new_s_context_v1 msg = { - .remove_cap = remove_cap, - .flags = flags - }; + struct vcmd_new_s_context_v1 msg; + msg.remove_cap = remove_cap; + msg.flags = flags; - return sys_virtual_context(VC_CMD(COMPAT, 1, 1), ctx, &msg); + return vserver(VC_CMD(COMPAT, 1, 1), CTX_USER2KERNEL(ctx), &msg); } static inline ALWAYSINLINE int vc_set_ipv4root_compat(uint32_t bcast, size_t nb, struct vc_ip_mask_pair const *ips) { - struct vcmd_set_ipv4root_v3 msg = { - .broadcast = bcast - }; + struct vcmd_set_ipv4root_v3 msg; size_t i; if (nb>=NB_IPV4ROOT) { @@ -50,12 +49,14 @@ vc_set_ipv4root_compat(uint32_t bcast, size_t nb, struct vc_ip_mask_pair const return -1; } + msg.broadcast = bcast; + for (i=0; i