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

2015-10-20 Thread Vladimir Davydov
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 
> > ---
> >  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 

> 
> >  
> > return seq_open(filp, _seq_ops);
___
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel


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

2015-10-20 Thread Vladimir Davydov
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 
> ---
>  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?

>  
>   return seq_open(filp, _seq_ops);
___
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel