From 0daa3b516940ebc854613573fa7505ae77ede5e5 Mon Sep 17 00:00:00 2001 From: Marcin Sulikowski Date: Thu, 3 Aug 2017 16:24:39 +0200 Subject: Fix support for FUSE_POSIX_ACL The kernel may set the FUSE_POSIX_ACL flag in the FUSE_INIT request to notify the userspace daemon that the OS does support POSIX ACLs for FUSE file systems. If the filesystem implementation wants to enable POSIX ACLs, it has to reply with the FUSE_POSIX_ACL flag set. However, the reply to the kernel never includes this flag, even if the implementation expresses the need by setting the FUSE_CAP_POSIX_ACL flag in the fuse_conn_info::want variable passed to its init callback. We modify the library to handle requests for FUSE_CAP_POSIX_ACL correctly, i.e., set the FUSE_POSIX_ACL flag in the FUSE_INIT reply to the kernel. Signed-off-by: Marcin Sulikowski --- lib/fuse_lowlevel.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib') diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c index ccdb5a5..34bff00 100644 --- a/lib/fuse_lowlevel.c +++ b/lib/fuse_lowlevel.c @@ -1981,6 +1981,8 @@ static void do_init(fuse_req_t req, fuse_ino_t nodeid, const void *inarg) outarg.flags |= FUSE_ASYNC_DIO; if (se->conn.want & FUSE_CAP_WRITEBACK_CACHE) outarg.flags |= FUSE_WRITEBACK_CACHE; + if (se->conn.want & FUSE_CAP_POSIX_ACL) + outarg.flags |= FUSE_POSIX_ACL; outarg.max_readahead = se->conn.max_readahead; outarg.max_write = se->conn.max_write; if (se->conn.proto_minor >= 13) { -- cgit v1.2.3