]> www.infradead.org Git - users/jedix/linux-maple.git/commit
fuse: allow idmapped mounts
authorAlexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Tue, 3 Sep 2024 15:16:25 +0000 (17:16 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Wed, 4 Sep 2024 14:51:11 +0000 (16:51 +0200)
commit16e1503eaf329129170e4e7a078aee17686967a5
treec6b23f7ab6d60204a18e5a109fa946a72f9587cf
parent6d14b18596ca69719cfe1af87dbf3c5e763d29b5
fuse: allow idmapped mounts

Now we have everything in place and we can allow idmapped mounts
by setting the FS_ALLOW_IDMAP flag. Notice that real availability
of idmapped mounts will depend on the fuse daemon. Fuse daemon
have to set FUSE_ALLOW_IDMAP flag in the FUSE_INIT reply.

To discuss:
- we enable idmapped mounts support only if "default_permissions" mode is
enabled, because otherwise we would need to deal with UID/GID mappings in
the userspace side OR provide the userspace with idmapped
req->in.h.uid/req->in.h.gid values which is not something that we probably
want to. Idmapped mounts philosophy is not about faking caller uid/gid.

Some extra links and examples:

- libfuse support
https://github.com/mihalicyn/libfuse/commits/idmap_support

- fuse-overlayfs support:
https://github.com/mihalicyn/fuse-overlayfs/commits/idmap_support

- cephfs-fuse conversion example
https://github.com/mihalicyn/ceph/commits/fuse_idmap

- glusterfs conversion example
https://github.com/mihalicyn/glusterfs/commits/fuse_idmap

Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/inode.c
include/uapi/linux/fuse.h