On Tue, Mar 25, 2025 at 05:06:46PM +0100, Hanna Czenczek wrote: > Since I actually took a look into how mounting with libfuse works[1], I > now know that the FUSE mount options are not exactly standard mount > system call options. Specifically: > - We should add "nosuid,nodev,noatime" because that is going to be > translated into the respective MS_ mount flags; and those flags make > sense for us. > - We can set rw/ro to make the mount writable or not. It makes sense to > set this flag to produce a better error message for read-only exports > (EROFS instead of EACCES). > This changes behavior as can be seen in iotest 308: It is no longer > possible to modify metadata of read-only exports. > > In addition, in the comment, we can note that the FUSE mount() system > call actually expects some more parameters that we can omit because > fusermount3 (i.e. libfuse) will figure them out by itself: > - fd: /dev/fuse fd > - rootmode: Inode mode of the root node > - user_id/group_id: Mounter's UID/GID > > [1] It invokes fusermount3, an SUID libfuse helper program, which parses > and processes some mount options before actually invoking the > mount() system call. > > Signed-off-by: Hanna Czenczek <hre...@redhat.com> > --- > block/export/fuse.c | 14 +++++++++++--- > tests/qemu-iotests/308 | 4 ++-- > tests/qemu-iotests/308.out | 3 ++- > 3 files changed, 15 insertions(+), 6 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
signature.asc
Description: PGP signature