From: Darrick J. Wong Date: Wed, 21 May 2025 22:37:31 +0000 (-0700) Subject: fuse2fs: allow some control over acls X-Git-Tag: v1.47.3-rc1~54 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0a72f4656dc88eb89c837a42f44f215d5fcf58a3;p=thirdparty%2Fe2fsprogs.git fuse2fs: allow some control over acls Allow some control over whether or not ACLs get used, though for kernel mode it will always be enabled. Signed-off-by: Darrick J. Wong Link: https://lore.kernel.org/r/174786677729.1383760.10883670792875770541.stgit@frogsfrogsfrogs Signed-off-by: Theodore Ts'o --- diff --git a/misc/fuse2fs.c b/misc/fuse2fs.c index 2d4ea61b..77d8321c 100644 --- a/misc/fuse2fs.c +++ b/misc/fuse2fs.c @@ -164,6 +164,7 @@ struct fuse2fs { uint8_t norecovery; uint8_t kernel; uint8_t directio; + uint8_t acl; unsigned long offset; unsigned int next_generation; unsigned long long cache_size; @@ -652,6 +653,10 @@ static void *op_init(struct fuse_conn_info *conn #ifdef FUSE_CAP_IOCTL_DIR conn->want |= FUSE_CAP_IOCTL_DIR; #endif +#ifdef FUSE_CAP_POSIX_ACL + if (ff->acl) + conn->want |= FUSE_CAP_POSIX_ACL; +#endif #if FUSE_VERSION >= FUSE_MAKE_VERSION(3, 0) conn->time_gran = 1; cfg->use_ino = 1; @@ -3828,8 +3833,9 @@ static struct fuse_opt fuse2fs_opts[] = { FUSE2FS_OPT("offset=%lu", offset, 0), FUSE2FS_OPT("kernel", kernel, 1), FUSE2FS_OPT("directio", directio, 1), + FUSE2FS_OPT("acl", acl, 1), + FUSE2FS_OPT("noacl", acl, 0), - FUSE_OPT_KEY("acl", FUSE2FS_IGNORED), FUSE_OPT_KEY("user_xattr", FUSE2FS_IGNORED), FUSE_OPT_KEY("noblock_validity", FUSE2FS_IGNORED), FUSE_OPT_KEY("cache_size=%s", FUSE2FS_CACHE_SIZE),