Bug 249119 - net/rsync: (3.2.3) fails to copy ZFS ACLs
Summary: net/rsync: (3.2.3) fails to copy ZFS ACLs
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Rodrigo Osorio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-04 23:12 UTC by Peter Eriksson
Modified: 2020-09-05 16:57 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (rodrigo)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Eriksson 2020-09-04 23:12:33 UTC
rsync 3.2.3 doesn't seem to copy ZFS ACLs correctly for some reason. 

FreeBSD 12.1

root# getfacl tst2
# file: tst2
# owner: root
# group: employee-liu.se
            owner@:rwxpDdaARWcCos:fd----I:allow
      user:parst38:r-----a-R-c---:-------:allow
            group@:--------------:fd----I:allow
         everyone@:--------------:fd----I:allow

root# getfacl tst
# file: tst
# owner: peter86
# group: employee-liu.se
            owner@:rwxpDdaARWcCos:fd----I:allow
            group@:--------------:fd----I:allow
         everyone@:--------------:fd----I:allow

root# rsync -aA -vv tst2/ tst
sending incremental file list
delta-transmission disabled for local transfer or --whole-file
./
total: matches=0  hash_hits=0  false_alarms=0 data=0

sent 76 bytes  received 86 bytes  324.00 bytes/sec
total size is 0  speedup is 0.00

root# getfacl tst
# file: tst
# owner: root
# group: employee-liu.se
            owner@:rwxpDdaARWcCos:fd----I:allow
            group@:--------------:fd----I:allow
         everyone@:--------------:fd----I:allow
Comment 1 Peter Eriksson 2020-09-05 16:57:31 UTC
Hmm... Reading the acl code in rsync it seems it just supports POSIX ACLs. So not so surprising that it doesn't really transfers any ACLs as it is.

In the extrapatch-acl file from the sync 3.1 port there is some NFS4 ACL support that probably should/could be forward-ported to 3.2

(Even though that patch isn't 100% - it has a tendency of causing retransmission again and again)


There is some half-baked code in 3.2 that maps OSX ACLs (which uses almost the same calls as FreeBSD for ACLs) into something that can be sent over the wire but in my opinion this whole code should be rewritten and probably use some standard representation (probably based on NFS4/Windows/ZFS ACLs) - with the added benefit for cross-OS compatibility. But that is probably something for the rsync folks and not a FreeBSD port...