Skip to content

fix: stash every received ACL under --fake-super - #8348

Merged
oferchen merged 3 commits into
masterfrom
fix/receiver-fake-super-dir-acls
Nov 13, 2026
Merged

oferchen merged 3 commits into
masterfrom
fix/receiver-fake-super-dir-acls

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

Under --fake-super, the network receiver now stashes every received ACL in the %aacl/%dacl xattrs instead of applying it, as 3.5.1 does. Before, only regular files written through disk_commit took the stash path. Directories, devices, specials, alt-dest matches, batch replay and up-to-date files got the real ACL applied, and they had no stash.

Stacked on #8332.

Changes

  1. fix: keep group_obj when condensing a wire-received fake-super ACL
    • RsyncAcl::condense_for_fake_super_store re-applied the sender's strip (rsync_acl_strip_perms(), acls.c:142-159) to an ACL that had already been stripped on the wire.
    • When the mask was stripped (it equals the mode's group bits), the second strip saw mask == NO_ENTRY and also blanked a group_obj that differs from the mask.
    • 3.5.1 stores that group:: entry (acls.c:1228-1238, duo_item->racl verbatim after recv_rsync_acl()'s mask restoration, acls.c:1000-1007).
    • The mask restoration now runs before the strip as well, so a filesystem-read ACL and a wire-received ACL condense to the same stored form.
    • This also fixes the existing transferred-file path, which had the same loss.
  2. fix: stash ACLs under --fake-super on every receiver path
    • apply_acls_from_receiver_cache (transfer receiver/pipeline_setup.rs) takes fake_super. When it is set, it calls store_acls_via_fake_super (upstream: acls.c:1228 set_rsync_acl(), am_root < 0 arm).
    • All six callers pass it: directory creation (x2), specials, alt-dest quick-check, the candidate quick-check match and batch replay.

Evidence

  • New oracle test tests/fake_super_receiver_acl_stash.rs:
    • A 3.5.1 client pushes -rtA -M--fake-super to each server (3.5.1, oc).
    • The fixture is a directory with access and default named ACLs and a file with a named ACL.
    • The client then pushes again after changing the source ACLs (mask above group::), which reaches the existing directory and the up-to-date file.
    • Real ACLs and stashes must match between the servers, and the oracle must show stashes and no real named entries.
    • It passes against the 3.5.1 tarball binary.
  • New unit test condensing_the_wire_form_keeps_a_group_obj_below_the_mask.
  • Mutations, each caught:
    • Drop the leading mask restore: unit test and oracle cell fail.
    • Ignore fake_super in apply_acls_from_receiver_cache: oracle cell fails.
    • Pass false at the up-to-date-file call site: oracle cell fails (second round).
  • Gates:
    • fmt-all: ok.
    • Workspace clippy: ok.
    • windows-gnu clippy (transfer, metadata, protocol): ok.
    • No-default clippy for transfer, protocol and metadata, plus transfer with xattr only and with acl only: ok.
    • dead_code_census: OK.
    • Citation ratchet: OK.
    • Targeted nextest (protocol, metadata, transfer, bin; acl / fake_super filters): 521/521 passed.

Not in scope

  • %stat ids under --fake-super without -o/-g: 3.5.1 wrote 2465469312:2465469312 for a file where oc writes 0:0. Tracked in task 496.

@oferchen
oferchen force-pushed the fix/receiver-fake-super-dir-acls branch from c5b7dca to 7466dcd Compare November 10, 2026 20:03
@oferchen
oferchen force-pushed the fix/receiver-fake-super-dir-acls branch from 7466dcd to 790db2c Compare November 10, 2026 20:36
@oferchen
oferchen force-pushed the fix/receiver-fake-super-dir-acls branch from 790db2c to 52e6b44 Compare November 11, 2026 07:42
@oferchen
oferchen force-pushed the fix/receiver-fake-super-dir-acls branch from 52e6b44 to 6ddfa1b Compare November 11, 2026 08:48
@oferchen
oferchen force-pushed the fix/receiver-fake-super-dir-acls branch from 6ddfa1b to f91119c Compare November 11, 2026 09:49
@oferchen
oferchen force-pushed the fix/receiver-fake-super-dir-acls branch from f91119c to 3e5ab1f Compare November 11, 2026 10:32
@oferchen
oferchen force-pushed the fix/receiver-fake-super-dir-acls branch from 3e5ab1f to ea2d254 Compare November 11, 2026 10:49
@oferchen
oferchen force-pushed the fix/receiver-fake-super-dir-acls branch from ea2d254 to d19577a Compare November 11, 2026 10:58
@oferchen

Copy link
Copy Markdown
Owner Author

Merge train: this pull request failed its batch run on its own (https://github.com/oferchen/rsync/actions/runs/43040542625). Failed required checks: upstream-testsuite / upstream testsuite, upstream-testsuite / upstream testsuite (root), upstream-testsuite-tcp / upstream testsuite, . It is held out of batches until its head changes.

@oferchen
oferchen force-pushed the fix/receiver-fake-super-dir-acls branch from d19577a to ac5148e Compare November 13, 2026 12:06
@oferchen
oferchen merged commit a0a0fc4 into master Nov 13, 2026
86 checks passed
@oferchen
oferchen deleted the fix/receiver-fake-super-dir-acls branch November 13, 2026 16:13
oferchen added a commit that referenced this pull request Nov 14, 2026
…odebase (#8381)

Updates and cleans up root documentation against the current codebase
and upstream rsync 3.5.1 reference:\n\n- **README.md**: Update required
status check count from 15 to 16 and include `rustdoc links` to match
the repository ruleset.\n- **SECURITY.md**: Remove stale claim that
`--fake-super` is unimplemented (implemented in PR #8348;
`daemon-namecvt-empty-response` passes on Linux non-root legs), and
update cargo-fuzz target counts to 36 total / 26 in `fuzz/` (adding
`connection_handoff`) / 31 daily sweep targets.\n- **CHANGELOG.md**: Add
recent `[Unreleased]` entries (#8354, #8364, #8372, #8375) and remove
stray blank lines inside `### Changed`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant