Skip to content

Commit c1d8221

Browse files
mihalicynMiklos Szeredi
authored andcommitted
fuse: support idmapped ->permission inode op
We only cover the case when "default_permissions" flag is used. A reason for that is that otherwise all the permission checks are done in the userspace and we have to deal with VFS idmapping in the userspace (which is bad), alternatively we have to provide the userspace with idmapped req->in.h.uid/req->in.h.gid which is also not align with VFS idmaps philosophy. Signed-off-by: Alexander Mikhalitsyn <[email protected]> Reviewed-by: Christian Brauner <[email protected]> Signed-off-by: Miklos Szeredi <[email protected]>
1 parent 2a8c810 commit c1d8221

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/fuse/dir.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1545,15 +1545,15 @@ static int fuse_permission(struct mnt_idmap *idmap,
15451545
}
15461546

15471547
if (fc->default_permissions) {
1548-
err = generic_permission(&nop_mnt_idmap, inode, mask);
1548+
err = generic_permission(idmap, inode, mask);
15491549

15501550
/* If permission is denied, try to refresh file
15511551
attributes. This is also needed, because the root
15521552
node will at first have no permissions */
15531553
if (err == -EACCES && !refreshed) {
15541554
err = fuse_perm_getattr(inode, mask);
15551555
if (!err)
1556-
err = generic_permission(&nop_mnt_idmap,
1556+
err = generic_permission(idmap,
15571557
inode, mask);
15581558
}
15591559

0 commit comments

Comments
 (0)