1 diff -urN util-vserver-0.30.215/lib/syscall_netadd-netv2.hc util-vserver-trunk/lib/syscall_netadd-netv2.hc
2 --- util-vserver-0.30.215/lib/syscall_netadd-netv2.hc 2008-03-17 09:59:48.000000000 +0100
3 +++ util-vserver-trunk/lib/syscall_netadd-netv2.hc 2008-05-22 23:51:10.000000000 +0200
8 // Copyright (C) 2007 Daniel Hokka Zakrisson
11 case VC_NXA_TYPE_IPV4: {
12 struct vcmd_net_addr_ipv4_v1 k_info;
14 - k_info.type = info->vna_type & ~VC_NXA_TYPE_IPV4;
15 - k_info.flags = info->vna_flags;
16 - k_info.ip.s_addr = info->vna_v4_ip.s_addr;
17 - k_info.mask.s_addr = info->vna_v4_mask.s_addr;
18 + k_info.type = info->vna_type & ~VC_NXA_TYPE_IPV4;
19 + k_info.flags = info->vna_flags;
20 + k_info.ip.s_addr = info->vna_v4_ip.s_addr;
21 + k_info.mask.s_addr = info->vna_v4_mask.s_addr;
23 + if (k_info.ip.s_addr == 0) {
24 + k_info.type = VC_NXA_TYPE_MASK;
25 + k_info.mask.s_addr = 0;
28 return vserver(VCMD_net_add_ipv4, NID_USER2KERNEL(nid), &k_info);
30 diff -urN util-vserver-0.30.215/src/naddress.c util-vserver-trunk/src/naddress.c
31 --- util-vserver-0.30.215/src/naddress.c 2008-03-17 09:59:45.000000000 +0100
32 +++ util-vserver-trunk/src/naddress.c 2008-05-22 23:51:01.000000000 +0200
37 // Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
38 // Copyright (C) 2006 Daniel Hokka Zakrisson <daniel@hozac.com>
47 diff -urN util-vserver-0.30.215/src/capability-compat.h util-vserver-trunk/src/capability-compat.h
48 --- util-vserver-0.30.215/src/capability-compat.h 2008-03-17 09:59:45.000000000 +0100
49 +++ util-vserver-trunk/src/capability-compat.h 2008-05-22 23:51:01.000000000 +0200
54 // Copyright (C) 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
57 extern int capset (struct __user_cap_header_struct *, struct __user_cap_data_struct *);
61 +#ifndef _LINUX_CAPABILITY_VERSION_1
62 +# define _LINUX_CAPABILITY_VERSION_1 _LINUX_CAPABILITY_VERSION
65 +#ifndef _LINUX_CAPABILITY_VERSION_2
66 +# define _LINUX_CAPABILITY_VERSION_2 0x20071026
68 diff -urN util-vserver-0.30.215/src/rpm-fake.c util-vserver-trunk/src/rpm-fake.c
69 --- util-vserver-0.30.215/src/rpm-fake.c 2008-03-17 09:59:45.000000000 +0100
70 +++ util-vserver-trunk/src/rpm-fake.c 2008-05-22 23:51:01.000000000 +0200
72 -// $Id$ --*- c++ -*--
73 +// $Id$ --*- c++ -*--
75 // Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
82 struct __user_cap_header_struct header;
83 - struct __user_cap_data_struct user;
84 + struct __user_cap_data_struct user[2];
86 - header.version = _LINUX_CAPABILITY_VERSION;
87 + header.version = _LINUX_CAPABILITY_VERSION_2;
90 - if (capget(&header, &user)==-1) {
92 + if (capget(&header, user)==-1) {
94 + header.version != _LINUX_CAPABILITY_VERSION_2) {
95 + header.version = _LINUX_CAPABILITY_VERSION_1;
100 exit(wrapper_exit_code);
103 - user.effective &= ~(1<<CAP_MKNOD);
104 - user.permitted &= ~(1<<CAP_MKNOD);
105 - user.inheritable &= ~(1<<CAP_MKNOD);
106 + user[0].effective &= ~(1<<CAP_MKNOD);
107 + user[0].permitted &= ~(1<<CAP_MKNOD);
108 + user[0].inheritable &= ~(1<<CAP_MKNOD);
110 - if (capset(&header, &user)==-1) {
111 + if (capset(&header, user)==-1) {
113 exit(wrapper_exit_code);
115 diff -urN util-vserver-0.30.215/src/vserver-info.c util-vserver-trunk/src/vserver-info.c
116 --- util-vserver-0.30.215/src/vserver-info.c 2008-03-17 09:59:45.000000000 +0100
117 +++ util-vserver-trunk/src/vserver-info.c 2008-05-22 23:51:01.000000000 +0200
122 // Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
129 struct __user_cap_header_struct header;
130 - struct __user_cap_data_struct user;
131 - header.version = _LINUX_CAPABILITY_VERSION;
132 + struct __user_cap_data_struct user[2];
134 + header.version = _LINUX_CAPABILITY_VERSION_2;
138 @@ -199,17 +201,24 @@
139 // perror( "prctl:" );
143 - if (capget(&header, &user)==-1) {
146 + if (capget(&header, user)==-1) {
148 + header.version != _LINUX_CAPABILITY_VERSION_2) {
149 + header.version = _LINUX_CAPABILITY_VERSION_1;
157 - user.effective = 0;
158 - user.permitted = 0;
159 - user.inheritable = 0;
160 + user[0].effective = user[1].effective = 0;
161 + user[0].permitted = user[1].permitted = 0;
162 + user[0].inheritable = user[1].inheritable = 0;
164 - if (capset(&header, &user)==-1) {
165 + if (capset(&header, user)==-1) {
169 diff -urN util-vserver-0.30.215/src/tunctl.c util-vserver-trunk/src/tunctl.c
170 --- util-vserver-0.30.215/src/tunctl.c 2008-03-17 09:59:45.000000000 +0100
171 +++ util-vserver-trunk/src/tunctl.c 2008-05-22 23:51:01.000000000 +0200
173 #include <linux/if_tun.h>
175 /* Make sure we have the necessary ioctls */
176 +#ifndef TUNSETNOCSUM
177 +# define TUNSETNOCSUM _IOW('T', 200, int)
180 +# define TUNSETIFF _IOW('T', 202, int)
182 +#ifndef TUNSETPERSIST
183 +# define TUNSETPERSIST _IOW('T', 203, int)
186 +# define TUNSETOWNER _IOW('T', 204, int)
189 +# define TUNSETLINK _IOW('T', 205, int)
192 # define TUNSETGROUP _IOW('T', 206, int)
194 diff -urN util-vserver-0.30.215/src/vspace.c util-vserver-trunk/src/vspace.c
195 --- util-vserver-0.30.215/src/vspace.c 2008-03-17 09:59:45.000000000 +0100
196 +++ util-vserver-trunk/src/vspace.c 2008-05-22 23:51:01.000000000 +0200
201 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
202 // Copyright (C) 2007 Daniel Hokka Zakrisson
209 signal(SIGCHLD, SIG_DFL);