From: Vivek Goyal <vgoyal@redhat.com>
To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
virtio-fs@redhat.com, miklos@szeredi.hu
Cc: vgoyal@redhat.com, lhenriques@suse.de, dgilbert@redhat.com,
seth.forshee@canonical.com
Subject: [PATCH 0/3] fuse: Fix clearing SGID when access ACL is set
Date: Fri, 19 Mar 2021 15:55:44 -0400 [thread overview]
Message-ID: <20210319195547.427371-1-vgoyal@redhat.com> (raw)
Hi,
Luis reported that xfstests generic/375 fails with virtiofs. Little
debugging showed that when posix access acl is set that in some
cases SGID needs to be cleared and that does not happen with virtiofs.
Setting posix access acl can lead to mode change and it can also lead
to clear of SGID. fuse relies on file server taking care of all
the mode changes. But file server does not have enough information to
determine whether SGID should be cleared or not.
Hence this patch series add support to send a flag in SETXATTR message
to tell server to clear SGID.
I have staged corresponding virtiofsd patches here.
https://github.com/rhvgoyal/qemu/commits/acl-sgid-setxattr-flag
With these patches applied "./check -g acl" passes now on virtiofs.
Vivek Goyal (3):
posic_acl: Add a helper determine if SGID should be cleared
fuse: Add support for FUSE_SETXATTR_V2
fuse: Add a flag FUSE_SETXATTR_ACL_KILL_SGID to kill SGID
fs/fuse/acl.c | 7 ++++++-
fs/fuse/fuse_i.h | 5 ++++-
fs/fuse/inode.c | 4 +++-
fs/fuse/xattr.c | 21 +++++++++++++++------
fs/posix_acl.c | 3 +--
include/linux/posix_acl.h | 11 +++++++++++
include/uapi/linux/fuse.h | 17 +++++++++++++++++
7 files changed, 57 insertions(+), 11 deletions(-)
--
2.25.4
next reply other threads:[~2021-03-19 19:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-19 19:55 Vivek Goyal [this message]
2021-03-19 19:55 ` [PATCH 1/3] posic_acl: Add a helper determine if SGID should be cleared Vivek Goyal
2021-03-19 22:42 ` Andreas Grünbacher
2021-03-20 10:03 ` Christian Brauner
2021-03-22 17:01 ` Vivek Goyal
2021-03-23 9:32 ` Christian Brauner
2021-03-23 22:50 ` Vivek Goyal
2021-03-19 19:55 ` [PATCH 2/3] fuse: Add support for FUSE_SETXATTR_V2 Vivek Goyal
2021-03-19 19:55 ` [PATCH 3/3] fuse: Add a flag FUSE_SETXATTR_ACL_KILL_SGID to kill SGID Vivek Goyal
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=20210319195547.427371-1-vgoyal@redhat.com \
--to=vgoyal@redhat.com \
--cc=dgilbert@redhat.com \
--cc=lhenriques@suse.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=seth.forshee@canonical.com \
--cc=virtio-fs@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).