lkml.org 
[lkml]   [2020]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3 19/25] commoncap: handle fsid mappings with vfs caps
On Tue, Feb 18, 2020 at 3:35 PM Christian Brauner
<christian.brauner@ubuntu.com> wrote:
> Switch vfs cap helpers to lookup fsids in the fsid mappings. If no fsid
> mappings are setup the behavior is unchanged, i.e. fsids are looked up in the
> id mappings.
[...]
> diff --git a/security/commoncap.c b/security/commoncap.c
[...]
> @@ -328,7 +328,7 @@ static bool rootid_owns_currentns(kuid_t kroot)
> return false;
>
> for (ns = current_user_ns(); ; ns = ns->parent) {
> - if (from_kuid(ns, kroot) == 0)
> + if (from_kfsuid(ns, kroot) == 0)
> return true;
> if (ns == &init_user_ns)
> break;

Nit: Maybe change the name of this function to something that makes it
clear that this operates in the fsuid mapping domain.

\
 
 \ /
  Last update: 2020-02-19 16:55    [W:3.012 / U:0.844 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site