add support for POSIX ACLs

This commit is contained in:
Antonio SJ Musumeci 2019-05-19 15:18:36 -04:00
parent ee0d87d712
commit 80d56ac94e
11 changed files with 78 additions and 31 deletions

View file

@ -1,4 +1,4 @@
VERSION = "2.9.7-mergerfs_2.26.0"
VERSION = "2.9.7-mergerfs_2.27.0"
OPT = -O2
ifeq ($(DEBUG),1)

View file

@ -112,6 +112,8 @@ struct fuse_file_info {
#define FUSE_CAP_SPLICE_READ (1 << 9)
#define FUSE_CAP_FLOCK_LOCKS (1 << 10)
#define FUSE_CAP_IOCTL_DIR (1 << 11)
#define FUSE_CAP_POSIX_ACL (1 << 19)
/**
* Ioctl flags

View file

@ -1795,6 +1795,8 @@ static void do_init(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
f->conn.capable |= FUSE_CAP_DONT_MASK;
if (arg->flags & FUSE_FLOCK_LOCKS)
f->conn.capable |= FUSE_CAP_FLOCK_LOCKS;
if (arg->flags & FUSE_POSIX_ACL)
f->conn.capable |= FUSE_CAP_POSIX_ACL;
} else {
f->conn.async_read = 0;
f->conn.max_readahead = 0;
@ -1861,6 +1863,8 @@ static void do_init(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
outarg.flags |= FUSE_DONT_MASK;
if (f->conn.want & FUSE_CAP_FLOCK_LOCKS)
outarg.flags |= FUSE_FLOCK_LOCKS;
if (f->conn.want & FUSE_CAP_POSIX_ACL)
outarg.flags |= FUSE_POSIX_ACL;
outarg.max_readahead = f->conn.max_readahead;
outarg.max_write = f->conn.max_write;
if (f->conn.proto_minor >= 13) {