summaryrefslogtreecommitdiff
blob: 171ef56c0f13e949b8c4556e5adf938dd38fb45c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
Index: vserver-sources-2.1.1_2.6.16/kernel/vserver/context.c
===================================================================
--- vserver-sources-2.1.1_2.6.16.orig/kernel/vserver/context.c
+++ vserver-sources-2.1.1_2.6.16/kernel/vserver/context.c
@@ -789,8 +789,6 @@ int vc_vx_info(uint32_t id, void __user 
 	struct vx_info *vxi;
 	struct vcmd_vx_info_v0 vc_data;
 
-	if (!vx_check(0, VX_ADMIN))
-		return -ENOSYS;
 	if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RESOURCE))
 		return -EPERM;
 
Index: vserver-sources-2.1.1_2.6.16/kernel/vserver/dlimit.c
===================================================================
--- vserver-sources-2.1.1_2.6.16.orig/kernel/vserver/dlimit.c
+++ vserver-sources-2.1.1_2.6.16/kernel/vserver/dlimit.c
@@ -233,8 +233,6 @@ int vc_add_dlimit(uint32_t id, void __us
 {
 	struct vcmd_ctx_dlimit_base_v0 vc_data;
 
-	if (!vx_check(0, VX_ADMIN))
-		return -ENOSYS;
 	if (copy_from_user (&vc_data, data, sizeof(vc_data)))
 		return -EFAULT;
 
@@ -245,8 +243,6 @@ int vc_rem_dlimit(uint32_t id, void __us
 {
 	struct vcmd_ctx_dlimit_base_v0 vc_data;
 
-	if (!vx_check(0, VX_ADMIN))
-		return -ENOSYS;
 	if (copy_from_user (&vc_data, data, sizeof(vc_data)))
 		return -EFAULT;
 
@@ -259,8 +255,6 @@ int vc_add_dlimit_x32(uint32_t id, void 
 {
 	struct vcmd_ctx_dlimit_base_v0_x32 vc_data;
 
-	if (!vx_check(0, VX_ADMIN))
-		return -ENOSYS;
 	if (copy_from_user (&vc_data, data, sizeof(vc_data)))
 		return -EFAULT;
 
@@ -272,8 +266,6 @@ int vc_rem_dlimit_x32(uint32_t id, void 
 {
 	struct vcmd_ctx_dlimit_base_v0_x32 vc_data;
 
-	if (!vx_check(0, VX_ADMIN))
-		return -ENOSYS;
 	if (copy_from_user (&vc_data, data, sizeof(vc_data)))
 		return -EFAULT;
 
@@ -350,8 +342,6 @@ int vc_set_dlimit(uint32_t id, void __us
 {
 	struct vcmd_ctx_dlimit_v0 vc_data;
 
-	if (!vx_check(0, VX_ADMIN))
-		return -ENOSYS;
 	if (copy_from_user (&vc_data, data, sizeof(vc_data)))
 		return -EFAULT;
 
@@ -367,8 +357,6 @@ int vc_set_dlimit_x32(uint32_t id, void 
 {
 	struct vcmd_ctx_dlimit_v0_x32 vc_data;
 
-	if (!vx_check(0, VX_ADMIN))
-		return -ENOSYS;
 	if (copy_from_user (&vc_data, data, sizeof(vc_data)))
 		return -EFAULT;
 
@@ -434,8 +422,6 @@ int vc_get_dlimit(uint32_t id, void __us
 	struct vcmd_ctx_dlimit_v0 vc_data;
 	int ret;
 
-	if (!vx_check(0, VX_ADMIN))
-		return -ENOSYS;
 	if (copy_from_user (&vc_data, data, sizeof(vc_data)))
 		return -EFAULT;
 
@@ -458,8 +444,6 @@ int vc_get_dlimit_x32(uint32_t id, void 
 	struct vcmd_ctx_dlimit_v0_x32 vc_data;
 	int ret;
 
-	if (!vx_check(0, VX_ADMIN))
-		return -ENOSYS;
 	if (copy_from_user (&vc_data, data, sizeof(vc_data)))
 		return -EFAULT;
 
Index: vserver-sources-2.1.1_2.6.16/kernel/vserver/inode.c
===================================================================
--- vserver-sources-2.1.1_2.6.16.orig/kernel/vserver/inode.c
+++ vserver-sources-2.1.1_2.6.16/kernel/vserver/inode.c
@@ -76,8 +76,6 @@ int vc_get_iattr(uint32_t id, void __use
 	struct vcmd_ctx_iattr_v1 vc_data = { .xid = -1 };
 	int ret;
 
-	if (!vx_check(0, VX_ADMIN))
-		return -ENOSYS;
 	if (copy_from_user (&vc_data, data, sizeof(vc_data)))
 		return -EFAULT;
 
Index: vserver-sources-2.1.1_2.6.16/kernel/vserver/namespace.c
===================================================================
--- vserver-sources-2.1.1_2.6.16.orig/kernel/vserver/namespace.c
+++ vserver-sources-2.1.1_2.6.16/kernel/vserver/namespace.c
@@ -53,9 +53,6 @@ int vc_enter_namespace(uint32_t id, void
 	struct namespace *old_ns;
 	int ret = 0;
 
-	if (!vx_check(0, VX_ADMIN))
-		return -ENOSYS;
-
 	vxi = lookup_vx_info(id);
 	if (!vxi)
 		return -ESRCH;
Index: vserver-sources-2.1.1_2.6.16/kernel/vserver/network.c
===================================================================
--- vserver-sources-2.1.1_2.6.16.orig/kernel/vserver/network.c
+++ vserver-sources-2.1.1_2.6.16/kernel/vserver/network.c
@@ -549,8 +549,6 @@ int vc_nx_info(uint32_t id, void __user 
 	struct nx_info *nxi;
 	struct vcmd_nx_info_v0 vc_data;
 
-	if (!vx_check(0, VX_ADMIN))
-		return -ENOSYS;
 	if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RESOURCE))
 		return -EPERM;
 
Index: vserver-sources-2.1.1_2.6.16/kernel/vserver/signal.c
===================================================================
--- vserver-sources-2.1.1_2.6.16.orig/kernel/vserver/signal.c
+++ vserver-sources-2.1.1_2.6.16/kernel/vserver/signal.c
@@ -75,8 +75,6 @@ int vc_ctx_kill(uint32_t id, void __user
 	struct vcmd_ctx_kill_v0 vc_data;
 	struct vx_info *vxi;
 
-	if (!vx_check(0, VX_ADMIN))
-		return -ENOSYS;
 	if (copy_from_user (&vc_data, data, sizeof(vc_data)))
 		return -EFAULT;