Add support for FUSE_POSIX_ACL
authorNikolaus Rath <Nikolaus@rath.org>
Tue, 22 Nov 2016 23:15:05 +0000 (15:15 -0800)
committerNikolaus Rath <Nikolaus@rath.org>
Tue, 22 Nov 2016 23:15:05 +0000 (15:15 -0800)
Fixes #117.

ChangeLog.rst
include/fuse_common.h
lib/fuse_lowlevel.c

index c1d43a284cb6f84b74def01de2e36e8cca32f0df..9c1a5dd6aca2ce140789c86cfd10e91aae9b4d15 100644 (file)
@@ -22,7 +22,8 @@ UNRELEASED CHANGES
   particular capability can still be disabled by unsetting the
   corresponding bit of `fuse_conn_info.wants` in the init() handler.
 
-* Added FUSE_CAP_PARALLEL_DIROPS feature flag.
+* Added FUSE_CAP_PARALLEL_DIROPS and FUSE_CAP_POSIX_ACL feature flags.
+
 
 FUSE 3.0.0-rc2 (2016-11-06)
 ===========================
index 7bf800843f0496fd4c4380408b6937ee28e7e692..f3361291a0a52509a2bd74400ddd9ebae93b9c30 100644 (file)
@@ -252,6 +252,21 @@ struct fuse_file_info {
  */
 #define FUSE_CAP_PARALLEL_DIROPS        (1 << 18)
 
+/**
+ * Indicates support for POSIX ACL.
+ *
+ * If this feature is enabled, the kernel will cache and have
+ * responsibility for enforcing ACLs. ACL will be stored as xattrs and
+ * passed to userspace, which is responsible for updating the ACLs in
+ * the filesystem, keeping the file mode in sync with the ACL, and
+ * ensuring inheritance of default ACLs when new filesystem nodes are
+ * created. Note that this requires that the file system is able to
+ * parse and interpret the xattr representation of ACLs.
+ *
+ * This feature is disabled by default.
+ */
+#define FUSE_CAP_POSIX_ACL              (1 << 19)
+
 /**
  * Ioctl flags
  *
index c7e3ebf15748f1142a6a20f920b8a9b1df1c648f..3941c7f75ba0a6563632f52015d427edfd565813 100644 (file)
@@ -1877,6 +1877,8 @@ static void do_init(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
                        se->conn.capable |= FUSE_CAP_NO_OPEN_SUPPORT;
                if (arg->flags & FUSE_PARALLEL_DIROPS)
                        se->conn.capable |= FUSE_CAP_PARALLEL_DIROPS;
+               if (arg->flags & FUSE_POSIX_ACL)
+                       se->conn.capable |= FUSE_CAP_POSIX_ACL;
        } else {
                se->conn.max_readahead = 0;
        }