This is a PoC patch for NFSv4/ZFS ACLs. The objective of the patch is that rsync --acls support NFSv4/ZFS ACLs without requiring a new command line option
NFSv4 ACLs can't be represented using POSIX draft ACLs, if an NFSv4 ACL is present a separate POSIX draft ACL will not be present and there are new APIs to access NFSv4 ACLs. So we need to distinguish between NFSv4 ACLs and POSIX ACLs in rsync. I've done this by introducing an "ACL type" on the wire, and revving the protocol version. If rsync encounters a NFSv4 ACL and the peer doesn't support the higher protocol version the process is terminated. Linux and Solaris represent NFSv4 ACLs differently and provide no API to serialize them in a platform-independent format so this patch treats the ACLs as platform-dependent opaque data. On Linux NFSv4 ACLs are implemented using xattrs so xattr support must be compiled in. The implementation re-uses xattrs.c:get_xattr_data so the static directive is removed from this function. All the NFSv4 ACL handling code is surrounded by #ifdef SUPPORT_NFS4_ACLS - the parts that handle sending and receiving the ACL type used in the higher protocol version are compiled in unconditionally The remaining to-dos are: * autoconf integration * move platform-specific code from acl.c to lib/sysacls.c or a new file lib/sysnfs4acls.c ? * wasn't sure how to SUBPROTOCOL_VERSION worked so I've revved PROTOCOL_VERSION to 31 - if this is agreed we need to set all the code that references the higher protocol version to use the right number * rebase off HEAD fake-super support is done. I can work on the remaining to-dos but before proceeding further I wanted to know if the basis of this patch would be accepted.
nfsv4acl-1.patch
Description: Binary data
-- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html