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

Vladimir Davydov vdavydov at virtuozzo.com
Tue Oct 20 07:26:33 PDT 2015


On Tue, Oct 20, 2015 at 04:07:44PM +0300, Vladimir Davydov wrote:
> On Tue, Oct 20, 2015 at 01:49:04PM +0300, Pavel Tikhomirov wrote:
> > https://jira.sw.ru/browse/PSBM-40433
> > Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
> > ---
> >  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;
> 
> Why do we need this check at all?

OK, doesn't matter, that's a legacy API anyway.

Reviewed-by: Vladimir Davydov <vdavydov at virtuozzo.com>

> 
> >  
> >  	return seq_open(filp, &ub_seq_ops);



More information about the Devel mailing list