[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAW3YpZMb3GkUBZ2ytN+KhUYDZOB44upCmWs2frYQ30RkDCLbA@mail.gmail.com>
Date: Mon, 30 Jul 2018 11:02:24 -0700
From: Todd Poynor <toddpoynor@...gle.com>
To: Dmitry Torokhov <dtor@...omium.org>
Cc: "toddpoynor@...il.com" <toddpoynor@...il.com>,
Rob Springer <rspringer@...gle.com>,
John Joseph <jnjoseph@...gle.com>, benchan@...omium.org,
Greg KH <gregkh@...uxfoundation.org>,
devel@...verdev.osuosl.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 04/13] staging: gasket: core: allow root access based on
user namespace
Hi Dmitry,
On Mon, Jul 30, 2018 at 10:57 AM Dmitry Torokhov <dtor@...omium.org> wrote:
>
> Hi Todd,
>
> On Sun, Jul 29, 2018 at 12:37 PM Todd Poynor <toddpoynor@...il.com> wrote:
> > @@ -1064,7 +1067,8 @@ static int gasket_open(struct inode *inode, struct file *filp)
> > char task_name[TASK_COMM_LEN];
> > struct gasket_cdev_info *dev_info =
> > container_of(inode->i_cdev, struct gasket_cdev_info, cdev);
> > - int is_root = capable(CAP_SYS_ADMIN);
> > + struct pid_namespace *pid_ns = task_active_pid_ns(current);
> > + int is_root = ns_capable(pid_ns->user_ns, CAP_SYS_ADMIN);
>
> ns_capable() returns bool, why did you make is_root an integer?
Gaah, I forgot to change the type of the existing var. Will fix, thanks -- Todd
>
> Thanks,
> Dmitry
Powered by blists - more mailing lists