mount2: add --allow-idmap to advertise FUSE_ALLOW_IDMAP

Lets the kernel id-map a mount2 mount into a user namespace
(e.g. Kubernetes pods with hostUsers: false). Off by default;
requires Linux 6.12+ and implies default_permissions.
This commit is contained in:
Valerij Fredriksen
2026-05-25 17:52:36 +01:00
committed by Nick Craig-Wood
parent be3bfe2d19
commit 675806067a
2 changed files with 7 additions and 0 deletions
+1
View File
@@ -33,6 +33,7 @@ func mountOptions(fsys *FS, f fs.Fs, opt *mountlib.Options) (mountOpts *fuse.Mou
MaxReadAhead: int(fsys.opt.MaxReadAhead),
MaxWrite: 1024 * 1024, // Linux v4.20+ caps requests at 1 MiB
DisableReadDirPlus: true,
IDMappedMount: opt.AllowIDMap,
// RememberInodes: true,
// SingleThreaded: true,