Skip to content

Commit d395d0a

Browse files
mihalicynMiklos Szeredi
authored andcommitted
fuse: support idmapped ->set_acl
It's just a matter of adjusting a permission check condition for S_ISGID flag. All the rest is already handled in the generic VFS code. Notice that this permission check is the analog of what we have in posix_acl_update_mode() generic helper, but fuse doesn't use this helper as on the kernel side we don't care about ensuring that POSIX ACL and CHMOD permissions are in sync as it is a responsibility of a userspace daemon to handle that. For the same reason we don't have a calls to posix_acl_chmod(), while most of other filesystem do. Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com> Reviewed-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
1 parent 4d833be commit d395d0a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/fuse/acl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ int fuse_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
144144
* be stripped.
145145
*/
146146
if (fc->posix_acl &&
147-
!in_group_or_capable(&nop_mnt_idmap, inode,
148-
i_gid_into_vfsgid(&nop_mnt_idmap, inode)))
147+
!in_group_or_capable(idmap, inode,
148+
i_gid_into_vfsgid(idmap, inode)))
149149
extra_flags |= FUSE_SETXATTR_ACL_KILL_SGID;
150150

151151
ret = fuse_setxattr(inode, name, value, size, 0, extra_flags);

0 commit comments

Comments
 (0)