/[base]
ViewVC logotype

Revision 361401


Jump to revision: Previous Next
Author: asomers
Date: Fri May 22 18:11:17 2020 UTC (4 years, 1 month ago)
Changed paths: 9
Log Message:
Fix issues with FUSE_ACCESS when default_permissions is disabled

This patch fixes two issues relating to FUSE_ACCESS when the
default_permissions mount option is disabled:

* VOP_ACCESS() calls with VADMIN set should never be sent to a fuse server
  in the form of FUSE_ACCESS operations. The FUSE protocol has no equivalent
  of VADMIN, so we must evaluate such things kernel-side, regardless of the
  default_permissions setting.

* The FUSE protocol only requires FUSE_ACCESS to be sent for two purposes:
  for the access(2) syscall and to check directory permissions for
  searchability during lookup. FreeBSD sends it much more frequently, due to
  differences between our VFS and Linux's, for which FUSE was designed. But
  this patch does eliminate several cases not required by the FUSE protocol:

  * for any FUSE_*XATTR operation
  * when creating a new file
  * when deleting a file
  * when setting timestamps, such as by utimensat(2).

* Additionally, when default_permissions is disabled, this patch removes one
  FUSE_GETATTR operation when deleting a file.

PR:		245689
Reported by:	MooseFS FreeBSD Team <freebsd@moosefs.pro>
Reviewed by:	cem
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D24777


Changed paths

Path Details
Directoryhead/sys/fs/fuse/fuse_internal.c modified , text changed
Directoryhead/sys/fs/fuse/fuse_vnops.c modified , text changed
Directoryhead/tests/sys/fs/fusefs/access.cc modified , text changed
Directoryhead/tests/sys/fs/fusefs/rename.cc modified , text changed
Directoryhead/tests/sys/fs/fusefs/rmdir.cc modified , text changed
Directoryhead/tests/sys/fs/fusefs/unlink.cc modified , text changed
Directoryhead/tests/sys/fs/fusefs/utils.cc modified , text changed
Directoryhead/tests/sys/fs/fusefs/utils.hh modified , text changed
Directoryhead/tests/sys/fs/fusefs/xattr.cc modified , text changed

  ViewVC Help
Powered by ViewVC 1.1.27