Repository navigation
feat: implement ACL wire format for upstream rsync 3.4.1 interop - #3092
Merged
Merged
Conversation
Implement the full ACL wire protocol to enable --acls / -A interop with upstream rsync. Three core capabilities were missing: 1. Sender reads real filesystem ACLs via exacl (get_rsync_acl) instead of faking from file mode bits alone. 2. Sender strips base permission entries before sending, matching upstream rsync_acl_strip_perms() in acls.c:138-155. 3. Receiver reconstructs stripped base entries from file mode, matching upstream change_sacl_perms() in acls.c:857-933. The generator now calls prepare_pending_acl() for each file entry to read ACLs from the filesystem and pass them to the file list writer via set_pending_acl(). The writer strips and sends them on the wire. On the receiver side, apply_acls_from_cache now accepts an optional mode parameter for proper reconstruction of stripped entries. Includes 8 unit tests for strip_perms_for_send covering basic files, mode variants, mask/group matching, and wire roundtrip after stripping.
group_obj should only be stripped when it equals the group permission bits from the file mode. When group_obj=3 and mode group bits=7, the values differ so group_obj must be preserved on the wire. upstream: acls.c:148 - group_obj == group_perms check
oferchen
added a commit
that referenced
this pull request
May 1, 2026
* feat: implement ACL wire format for upstream rsync 3.4.1 interop Implement the full ACL wire protocol to enable --acls / -A interop with upstream rsync. Three core capabilities were missing: 1. Sender reads real filesystem ACLs via exacl (get_rsync_acl) instead of faking from file mode bits alone. 2. Sender strips base permission entries before sending, matching upstream rsync_acl_strip_perms() in acls.c:138-155. 3. Receiver reconstructs stripped base entries from file mode, matching upstream change_sacl_perms() in acls.c:857-933. The generator now calls prepare_pending_acl() for each file entry to read ACLs from the filesystem and pass them to the file list writer via set_pending_acl(). The writer strips and sends them on the wire. On the receiver side, apply_acls_from_cache now accepts an optional mode parameter for proper reconstruction of stripped entries. Includes 8 unit tests for strip_perms_for_send covering basic files, mode variants, mask/group matching, and wire roundtrip after stripping. * fix: correct ACL test expectation for group_obj when not matching mode group_obj should only be stripped when it equals the group permission bits from the file mode. When group_obj=3 and mode group bits=7, the values differ so group_obj must be preserved on the wire. upstream: acls.c:148 - group_obj == group_perms check
oferchen
added a commit
that referenced
this pull request
May 5, 2026
* feat: implement ACL wire format for upstream rsync 3.4.1 interop Implement the full ACL wire protocol to enable --acls / -A interop with upstream rsync. Three core capabilities were missing: 1. Sender reads real filesystem ACLs via exacl (get_rsync_acl) instead of faking from file mode bits alone. 2. Sender strips base permission entries before sending, matching upstream rsync_acl_strip_perms() in acls.c:138-155. 3. Receiver reconstructs stripped base entries from file mode, matching upstream change_sacl_perms() in acls.c:857-933. The generator now calls prepare_pending_acl() for each file entry to read ACLs from the filesystem and pass them to the file list writer via set_pending_acl(). The writer strips and sends them on the wire. On the receiver side, apply_acls_from_cache now accepts an optional mode parameter for proper reconstruction of stripped entries. Includes 8 unit tests for strip_perms_for_send covering basic files, mode variants, mask/group matching, and wire roundtrip after stripping. * fix: correct ACL test expectation for group_obj when not matching mode group_obj should only be stripped when it equals the group permission bits from the file mode. When group_obj=3 and mode group bits=7, the values differ so group_obj must be preserved on the wire. upstream: acls.c:148 - group_obj == group_perms check
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan