cloud-hypervisor / fuse-backend-rs

Rust crate for implementing FUSE backends
Apache License 2.0
130 stars 65 forks source link

api: add support for multiple uid/gid idmappings #179

Open yawqi opened 10 months ago

yawqi commented 10 months ago

Currently, only single uid/gid idmapping supported. However, in userns, multiple idmappings can be setted. Besides, in the fuse-overlayfs project, multiple idmappings are supported. https://github.com/containers/fuse-overlayfs/blob/18f4d6768ab2178f0147c1bac0ccfd7d44841a56/README.md?plain=1#L16

This commit will be used to support https://github.com/kata-containers/kata-containers/issues/8170. Currently, there is no idmap mount support for virtiofs in kernel side. So the support from the virtiofs server side can be used as a temporary workaround.

This comment https://github.com/containerd/containerd/issues/7063#issuecomment-1157072496 provides a way to solve the rootfs' idmapping problem. Although it is not used in their implementation at last, but can be used for us to support userns in kata in the first place.