Whamcloud - gitweb
fuse2fs: add an easy option for emulating kernel access behaviors
authorDarrick J. Wong <djwong@kernel.org>
Thu, 24 Apr 2025 21:42:20 +0000 (14:42 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 21 May 2025 14:25:07 +0000 (10:25 -0400)
commit667ea124cf16c45f3a35b3ba024a3add962788c7
tree9a848a9c16870ed6495c92067f03fc3337d87f93
parent1686713e8afc3f40f4a92e86949a909492fda3cd
fuse2fs: add an easy option for emulating kernel access behaviors

By default, fuse doesn't allow processes with a uid/gid that don't match
those of the server process to access the fuse mount, it doesn't allow
suid files or devices, and it relies on the fuse server to perform
permissions checking.  This is a secure default for very untrusted
filesystems, but it's possible that we might actually want to allow
general access to an ext4 filesystem as part of containerizing the ext4
metadata parsing.  In other words, we want the kernel access control
behavior.

Add an "kernel" mount option that moves most of the access permissions
interpretation back into the kernel, and logs mount/unmount/error
messages to dmesg.  Right now this is mostly useful for fstests, so we
leave it off by default.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Link: https://lore.kernel.org/r/174553065033.1160461.1393760776420459221.stgit@frogsfrogsfrogs
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/fuse2fs.1.in
misc/fuse2fs.c