[Devel] [PATCH RHEL7 COMMIT] ubc: proc show stats in ve user ns

Konstantin Khorenko khorenko at virtuozzo.com
Tue Oct 20 08:06:37 PDT 2015


The commit is pushed to "branch-rh7-3.10.0-229.7.2.vz7.9.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-229.7.2.vz7.8.9
------>
commit ae11b1b8063fd026ece0a61e96b45f0589fd965e
Author: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
Date:   Tue Oct 20 19:06:37 2015 +0400

    ubc: proc show stats in ve user ns
    
    https://jira.sw.ru/browse/PSBM-40433
    
    Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
    Reviewed-by: Vladimir Davydov <vdavydov at virtuozzo.com>
    
    khorenko@: otherwise /proc/user_beancounters file is inaccessible
    from inside a CT
---
 kernel/bc/proc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/bc/proc.c b/kernel/bc/proc.c
index 21672d9..9e9fde4 100644
--- a/kernel/bc/proc.c
+++ b/kernel/bc/proc.c
@@ -267,7 +267,7 @@ static struct seq_operations ub_seq_ops = {
 
 static int ub_open(struct inode *inode, struct file *filp)
 {
-	if (!(capable(CAP_DAC_OVERRIDE) && capable(CAP_DAC_READ_SEARCH)))
+	if (!(ve_capable(CAP_DAC_OVERRIDE) && ve_capable(CAP_DAC_READ_SEARCH)))
 		return -EACCES;
 
 	return seq_open(filp, &ub_seq_ops);



More information about the Devel mailing list