git://git.onelab.eu
/
linux-2.6.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7794ffc
)
Hopefully this one is fixed.
author
Sapan Bhatia
<sapanb@cs.princeton.edu>
Wed, 12 Mar 2008 00:15:53 +0000
(
00:15
+0000)
committer
Sapan Bhatia
<sapanb@cs.princeton.edu>
Wed, 12 Mar 2008 00:15:53 +0000
(
00:15
+0000)
linux-2.6-595-vserver-new-netns.patch
patch
|
blob
|
history
diff --git
a/linux-2.6-595-vserver-new-netns.patch
b/linux-2.6-595-vserver-new-netns.patch
index
f946b50
..
81d4cff
100644
(file)
--- a/
linux-2.6-595-vserver-new-netns.patch
+++ b/
linux-2.6-595-vserver-new-netns.patch
@@
-1,6
+1,6
@@
---- linux-
2.6.22-590/kernel/vserver/space.c.orig 2008-02-29 09:01:28.000000000 -05
00
-+++ linux-
2.6.22-590/kernel/vserver/space.c 2008-03-06 15:47:26.000000000 -05
00
-@@ -15,
6 +15,7
@@
+--- linux-
i686-2.6.22/kernel/vserver/space.c.orig 2008-03-11 20:14:21.000000000 -04
00
++++ linux-
i686-2.6.22/kernel/vserver/space.c 2008-03-11 20:13:53.000000000 -04
00
+@@ -15,
12 +15,15
@@
#include <linux/utsname.h>
#include <linux/nsproxy.h>
#include <linux/err.h>
#include <linux/utsname.h>
#include <linux/nsproxy.h>
#include <linux/err.h>
@@
-8,15
+8,37
@@
#include <asm/uaccess.h>
#include <linux/vs_context.h>
#include <asm/uaccess.h>
#include <linux/vs_context.h>
-@@ -54,6 +55,7 @@
+ #include <linux/vserver/space.h>
+ #include <linux/vserver/space_cmd.h>
+
++#include <linux/capability.h>
++
+
+ atomic_t vs_global_nsproxy = ATOMIC_INIT(0);
+ atomic_t vs_global_fs = ATOMIC_INIT(0);
+@@ -55,9 +58,21 @@
struct mnt_namespace *old_ns;
struct uts_namespace *old_uts;
struct ipc_namespace *old_ipc;
+ struct net *old_net;
struct nsproxy *nsproxy;
struct mnt_namespace *old_ns;
struct uts_namespace *old_uts;
struct ipc_namespace *old_ipc;
+ struct net *old_net;
struct nsproxy *nsproxy;
++ /* Dunno if task_lock is really needed */
++ task_lock(current);
++ if (!cap_raised(current->cap_effective, CAP_SYS_ADMIN)) {
++ current->cap_effective = cap_raise(current->cap_effective, CAP_SYS_ADMIN);
++ }
nsproxy = copy_nsproxy(old_nsproxy);
nsproxy = copy_nsproxy(old_nsproxy);
-@@ -83,6 +85,17 @@
++ if (cap_raised(current->cap_effective, CAP_SYS_ADMIN)) {
++ current->cap_effective = cap_lower(current->cap_effective, CAP_SYS_ADMIN);
++ }
++ task_unlock(current);
++ /* <- */
++
+ if (!nsproxy)
+ goto out;
+
+@@ -84,6 +99,16 @@
get_ipc_ns(nsproxy->ipc_ns);
} else
old_ipc = NULL;
get_ipc_ns(nsproxy->ipc_ns);
} else
old_ipc = NULL;
@@
-26,7
+48,6
@@
+ nsproxy->net_ns = new_nsproxy->net_ns;
+ if (nsproxy->net_ns) {
+ get_net(nsproxy->net_ns);
+ nsproxy->net_ns = new_nsproxy->net_ns;
+ if (nsproxy->net_ns) {
+ get_net(nsproxy->net_ns);
-+ printk(KERN_ALERT "Cloning network namespace\n");
+ }
+ } else
+ old_net = NULL;
+ }
+ } else
+ old_net = NULL;
@@
-34,7
+55,7
@@
if (old_ns)
put_mnt_ns(old_ns);
if (old_ns)
put_mnt_ns(old_ns);
-@@ -9
0,6 +101
,9 @@
+@@ -9
1,6 +116
,9 @@
put_uts_ns(old_uts);
if (old_ipc)
put_ipc_ns(old_ipc);
put_uts_ns(old_uts);
if (old_ipc)
put_ipc_ns(old_ipc);
@@
-44,7
+65,7
@@
out:
return nsproxy;
}
out:
return nsproxy;
}
-@@ -25
0,7 +264
,8 @@
+@@ -25
1,7 +279
,8 @@
int vc_enter_space(struct vx_info *vxi, void __user *data)
{
int vc_enter_space(struct vx_info *vxi, void __user *data)
{