Skip to content

Commit

Permalink
fuse: port to vfs{g,u}id_t and associated helpers
Browse files Browse the repository at this point in the history
A while ago we introduced a dedicated vfs{g,u}id_t type in commit
1e5267c ("mnt_idmapping: add vfs{g,u}id_t").  We already switched over
a good part of the VFS.  Ultimately we will remove all legacy idmapped
mount helpers that operate only on k{g,u}id_t in favor of the new type safe
helpers that operate on vfs{g,u}id_t.

Cc: Seth Forshee (Digital Ocean) <sforshee@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
  • Loading branch information
Christian Brauner authored and Miklos Szeredi committed Nov 23, 2022
1 parent 0618021 commit 00d369b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/fuse/acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ int fuse_set_acl(struct user_namespace *mnt_userns, struct inode *inode,
return ret;
}

if (!in_group_p(i_gid_into_mnt(&init_user_ns, inode)) &&
if (!vfsgid_in_group_p(i_gid_into_vfsgid(&init_user_ns, inode)) &&
!capable_wrt_inode_uidgid(&init_user_ns, inode, CAP_FSETID))
extra_flags |= FUSE_SETXATTR_ACL_KILL_SGID;

Expand Down

0 comments on commit 00d369b

Please sign in to comment.