[Devel] [PATCH RHEL7 COMMIT] Revert "ve/proc/ipc: allow mount proc and mqueue inside container"
Konstantin Khorenko
khorenko at virtuozzo.com
Tue Sep 8 01:53:39 PDT 2015
The commit is pushed to "branch-rh7-3.10.0-229.7.2.vz7.8.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-229.7.2.vz7.6.8
------>
commit 54fa44c6ed9ed08dea49a44162a1501d852ebe34
Author: Andrew Vagin <avagin at openvz.org>
Date: Tue Sep 8 12:53:39 2015 +0400
Revert "ve/proc/ipc: allow mount proc and mqueue inside container"
This reverts commit 7ae5af469667a2a5e1803a5a65fc16d9d6b3b965.
https://jira.sw.ru/browse/PSBM-39077
Signed-off-by: Andrew Vagin <avagin at virtuozzo.com>
Reviewed-by: Vladimir Davydov <vdavydov at virtuozzo.com>
---
fs/proc/root.c | 3 +--
ipc/mqueue.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/proc/root.c b/fs/proc/root.c
index 0b7dbdb..88be7c2 100644
--- a/fs/proc/root.c
+++ b/fs/proc/root.c
@@ -121,8 +121,7 @@ static struct dentry *proc_mount(struct file_system_type *fs_type,
options = data;
if (!current_user_ns()->may_mount_proc ||
- (!ns_capable(ns->user_ns, CAP_SYS_ADMIN) &&
- !ns_capable(ns->user_ns, CAP_VE_SYS_ADMIN)))
+ !ns_capable(ns->user_ns, CAP_SYS_ADMIN))
return ERR_PTR(-EPERM);
}
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index 6a8f37d..e811d2a 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -335,8 +335,7 @@ static struct dentry *mqueue_mount(struct file_system_type *fs_type,
/* Don't allow mounting unless the caller has CAP_SYS_ADMIN
* over the ipc namespace.
*/
- if (!ns_capable(ns->user_ns, CAP_SYS_ADMIN) &&
- !ns_capable(ns->user_ns, CAP_VE_SYS_ADMIN))
+ if (!ns_capable(ns->user_ns, CAP_SYS_ADMIN))
return ERR_PTR(-EPERM);
data = ns;
More information about the Devel
mailing list