git://git.onelab.eu
/
util-vserver.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge 0.30.214.
[util-vserver.git]
/
lib
/
syscall-compat.hc
diff --git
a/lib/syscall-compat.hc
b/lib/syscall-compat.hc
index
8bbe9eb
..
5f69384
100644
(file)
--- a/
lib/syscall-compat.hc
+++ b/
lib/syscall-compat.hc
@@
-1,4
+1,4
@@
-// $Id: syscall-compat.hc
,v 1.1.4.8 2004/02/19 22:56:53 ensc Exp
$ --*- c++ -*--
+// $Id: syscall-compat.hc
1450 2004-04-14 23:21:23Z ensc
$ --*- c++ -*--
// Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
//
// Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
//
@@
-22,20
+22,18
@@
#include "compat.h"
#include "safechroot-internal.hc"
#include "compat.h"
#include "safechroot-internal.hc"
-
#include "vserver.h"
#include "vserver.h"
-#include "vserver-internal.h"
#include <unistd.h>
#include <unistd.h>
-static inline ALWAYSINLINE
in
t
+static inline ALWAYSINLINE
xid_
t
vc_new_s_context_compat(xid_t ctx, unsigned int remove_cap, unsigned int flags)
{
struct vcmd_new_s_context_v1 msg;
msg.remove_cap = remove_cap;
msg.flags = flags;
vc_new_s_context_compat(xid_t ctx, unsigned int remove_cap, unsigned int flags)
{
struct vcmd_new_s_context_v1 msg;
msg.remove_cap = remove_cap;
msg.flags = flags;
- return vserver(VC
_CMD(COMPAT, 1, 1)
, CTX_USER2KERNEL(ctx), &msg);
+ return vserver(VC
MD_new_s_context
, CTX_USER2KERNEL(ctx), &msg);
}
static inline ALWAYSINLINE int
}
static inline ALWAYSINLINE int
@@
-45,23
+43,16
@@
vc_set_ipv4root_compat(uint32_t bcast, size_t nb, struct vc_ip_mask_pair const
size_t i;
if (nb>NB_IPV4ROOT) {
size_t i;
if (nb>NB_IPV4ROOT) {
- errno = -E
INVAL
;
+ errno = -E
OVERFLOW
;
return -1;
}
msg.broadcast = bcast;
for (i=0; i<nb; ++i) {
return -1;
}
msg.broadcast = bcast;
for (i=0; i<nb; ++i) {
- msg.
ip
_mask_pair[i].ip = ips[i].ip;
- msg.
ip
_mask_pair[i].mask = ips[i].mask;
+ msg.
nx
_mask_pair[i].ip = ips[i].ip;
+ msg.
nx
_mask_pair[i].mask = ips[i].mask;
}
}
- return vserver(VC_CMD(COMPAT, 2, 3), nb, &msg);
-}
-
-static inline ALWAYSINLINE int
-vc_chrootsafe_compat(char const *dir)
-{
- vc_tell_unsafe_chroot();
- return chroot(dir);
+ return vserver(VCMD_set_ipv4root, nb, &msg);
}
}