diff options
Diffstat (limited to 'vserver-sources/old/2.1.1_rc27/4415_vs2.1.1-namespace-clean01.patch')
-rw-r--r-- | vserver-sources/old/2.1.1_rc27/4415_vs2.1.1-namespace-clean01.patch | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/vserver-sources/old/2.1.1_rc27/4415_vs2.1.1-namespace-clean01.patch b/vserver-sources/old/2.1.1_rc27/4415_vs2.1.1-namespace-clean01.patch new file mode 100644 index 0000000..b629717 --- /dev/null +++ b/vserver-sources/old/2.1.1_rc27/4415_vs2.1.1-namespace-clean01.patch @@ -0,0 +1,76 @@ +Index: linux-2.6.17/kernel/vserver/namespace.c +=================================================================== +--- linux-2.6.17.orig/kernel/vserver/namespace.c ++++ linux-2.6.17/kernel/vserver/namespace.c +@@ -3,10 +3,11 @@ + * + * Virtual Server: Context Namespace Support + * +- * Copyright (C) 2003-2005 Herbert Pötzl ++ * Copyright (C) 2003-2006 Herbert Pötzl + * + * V0.01 broken out from context.c 0.07 + * V0.02 added task locking for namespace ++ * V0.03 broken out vx_enter_namespace + * + */ + +@@ -27,26 +28,7 @@ + + #include <linux/namespace.h> + +-int vx_set_namespace(struct vx_info *vxi, struct namespace *ns, struct fs_struct *fs) +-{ +- struct fs_struct *fs_copy; +- +- if (vxi->vx_namespace) +- return -EPERM; +- if (!ns || !fs) +- return -EINVAL; +- +- fs_copy = copy_fs_struct(fs); +- if (!fs_copy) +- return -ENOMEM; +- +- get_namespace(ns); +- vxi->vx_namespace = ns; +- vxi->vx_fs = fs_copy; +- return 0; +-} +- +-int vc_enter_namespace(struct vx_info *vxi, void __user *data) ++int vx_enter_namespace(struct vx_info *vxi) + { + struct fs_struct *old_fs, *fs; + struct namespace *old_ns; +@@ -73,6 +55,30 @@ int vc_enter_namespace(struct vx_info *v + return 0; + } + ++int vx_set_namespace(struct vx_info *vxi, struct namespace *ns, struct fs_struct *fs) ++{ ++ struct fs_struct *fs_copy; ++ ++ if (vxi->vx_namespace) ++ return -EPERM; ++ if (!ns || !fs) ++ return -EINVAL; ++ ++ fs_copy = copy_fs_struct(fs); ++ if (!fs_copy) ++ return -ENOMEM; ++ ++ get_namespace(ns); ++ vxi->vx_namespace = ns; ++ vxi->vx_fs = fs_copy; ++ return 0; ++} ++ ++int vc_enter_namespace(struct vx_info *vxi, void __user *data) ++{ ++ return vx_enter_namespace(vxi); ++} ++ + int vc_set_namespace(struct vx_info *vxi, void __user *data) + { + struct fs_struct *fs; |