From: David Howells <dhowells@redhat.com>
To: Tycho Andersen <tycho@tycho.pizza>,
Christian Brauner <christian.brauner@ubuntu.com>
Cc: dhowells@redhat.com, Tycho Andersen <tycho@tycho.ws>,
James Morris <jmorris@namei.org>,
linux-fsdevel@vger.kernel.org,
containers@lists.linux-foundation.org,
linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 09/40] xattr: handle idmapped mounts
Date: Wed, 03 Mar 2021 13:24:02 +0000 [thread overview]
Message-ID: <2129497.1614777842@warthog.procyon.org.uk> (raw)
In-Reply-To: <20210121131959.646623-10-christian.brauner@ubuntu.com>
Christian Brauner <christian.brauner@ubuntu.com> wrote:
> diff --git a/fs/cachefiles/xattr.c b/fs/cachefiles/xattr.c
> index 72e42438f3d7..a591b5e09637 100644
> --- a/fs/cachefiles/xattr.c
> +++ b/fs/cachefiles/xattr.c
> @@ -39,8 +39,8 @@ int cachefiles_check_object_type(struct cachefiles_object *object)
> _enter("%p{%s}", object, type);
>
> /* attempt to install a type label directly */
> - ret = vfs_setxattr(dentry, cachefiles_xattr_cache, type, 2,
> - XATTR_CREATE);
> + ret = vfs_setxattr(&init_user_ns, dentry, cachefiles_xattr_cache, type,
> + 2, XATTR_CREATE);
Actually, on further consideration, this might be the wrong thing to do in
cachefiles. The creds are (or should be) overridden when accesses to the
underlying filesystem are being made.
I wonder if this should be using current_cred()->user_ns or
cache->cache_cred->user_ns instead.
David
next parent reply other threads:[~2021-03-03 18:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210121131959.646623-10-christian.brauner@ubuntu.com>
[not found] ` <20210121131959.646623-1-christian.brauner@ubuntu.com>
2021-03-03 13:24 ` David Howells [this message]
2021-03-03 14:05 ` Christian Brauner
2021-03-03 14:45 ` David Howells
2021-03-03 16:15 ` Christian Brauner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2129497.1614777842@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=christian.brauner@ubuntu.com \
--cc=containers@lists.linux-foundation.org \
--cc=jmorris@namei.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=tycho@tycho.pizza \
--cc=tycho@tycho.ws \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®