[patch] NFSv4/ZFS ACLs

Richard P richardp345 at gmail.com
Sat Jun 9 15:19:34 MDT 2012

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
to access NFSv4 ACLs.  So we need to distinguish between NFSv4 ACLs and
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
directive is removed from this function.

All the NFSv4 ACL handling code is surrounded by
- 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
 - 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20120609/729c8ee4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nfsv4acl-1.patch
Type: application/octet-stream
Size: 16024 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/rsync/attachments/20120609/729c8ee4/attachment.obj>

More information about the rsync mailing list