Fix fallback cache handling for cwd-dependent binaries#2180
Merged
Conversation
4 tasks
oferchen
added a commit
that referenced
this pull request
May 16, 2026
…4117) Upstream rsync 3.4.1 emits exactly one DEBUG_GTE(ACL, 1) line in `acls.c::default_perms_for_dir` (`acls.c:1133-1134`): "got ACL-based default perms %o for directory %s\n" The function is invoked from the generator and receiver (`generator.c:1337-1340`, `receiver.c:846-851`) once per unique parent directory whenever `--acls` is on but `--perms` is off, so dest_mode() can fold the parent's default ACL bits into newly-created children. This change introduces the equivalent on the oc-rsync side: - `crates/protocol/src/acl/trace.rs` - `trace_default_perms_for_dir` helper emitting the upstream-verbatim wording via `debug_log!`, with pinning tests covering the wire shape and level gating. - `crates/metadata/src/acl_exacl.rs::default_perms_for_dir` - reads the directory's POSIX default ACL via `exacl::getfacl`, extracts the user/group/other entries (mirroring `rsync_acl_get_perms`), and fires the trace when a user_obj is present. Filesystem errors and absent default ACLs fall back to `ACCESSPERMS & ~umask` without emitting, matching upstream's silent fallback. - Cross-platform stubs in `acl_noop.rs`, `acl_stub.rs`, and `acl_windows.rs` return the umask-derived default without emitting, matching upstream's `#ifdef SUPPORT_ACLS` guard. - `crates/transfer/src/receiver/directory/creation.rs` invokes the helper from `create_directories` per unique new parent when `acls && !perms`, gated to the platforms where the exacl path is compiled. - Unit tests in `acl_exacl.rs` assert the byte-exact emission against a real default ACL on Linux/FreeBSD and confirm the level-0 gate suppresses the line. - `docs/audits/debug-flags-verbosity-matrix.md` rolls ACL from missing to impl, updates the G3 gap, and refreshes the insertion table to point at the wired call site. Closes #2180.
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
Testing
Codex Task