feat(metadata): complete Windows ACL read/write via windows-rs (#1866)#3558
Merged
Conversation
The Windows ACL implementation in `metadata::acl_windows` was previously unreachable because every engine and CLI call site gated invocation on `cfg(all(unix, feature = "acl"))`. This widens the gates to `cfg(all(any(unix, windows), feature = "acl"))` so `--acls`/`-A` now flows through to the Win32 `GetNamedSecurityInfoW` / `SetNamedSecurityInfoW` paths on Windows. Scope: - engine local_copy executor (file, special, directory recursion) - engine `sync_acls_if_requested` and metadata-sync helpers - engine `LocalCopyOptions` setters / accessors / builder validation - core client config builder, run, remote invocation, flags - cli drive workflow, preflight feature validation, drive config - transfer flag emission Tests/fixtures that drive raw libacl / exacl FFI directly remain unix-only intentionally; only dispatch through `metadata::sync_acls` gains the Windows code path. Refs #1866
The mode parameter and LocalCopyExecution import in apply_final_directory_metadata were gated on `all(unix, any(feature = "acl", feature = "xattr"))`, but the call site for sync_acls_if_requested is gated on `all(any(unix, windows), feature = "acl")`. When building on Windows with the acl feature enabled (without xattr), `mode` was not in scope, causing E0425 in CI. Widen both gates to also include `all(windows, feature = "acl")` so the Windows + acl combination compiles.
The callee apply_final_directory_metadata accepts `mode` under `any(unix+acl|xattr, windows+acl)` but the caller was passing it under the narrower `unix+acl|xattr` gate. On windows+acl the call passed 5 args instead of 6, causing E0061. Match the caller's gate to the callee's.
oferchen
added a commit
that referenced
this pull request
May 5, 2026
#3558) * feat(metadata): wire Windows ACL support through engine pipeline (#1866) The Windows ACL implementation in `metadata::acl_windows` was previously unreachable because every engine and CLI call site gated invocation on `cfg(all(unix, feature = "acl"))`. This widens the gates to `cfg(all(any(unix, windows), feature = "acl"))` so `--acls`/`-A` now flows through to the Win32 `GetNamedSecurityInfoW` / `SetNamedSecurityInfoW` paths on Windows. Scope: - engine local_copy executor (file, special, directory recursion) - engine `sync_acls_if_requested` and metadata-sync helpers - engine `LocalCopyOptions` setters / accessors / builder validation - core client config builder, run, remote invocation, flags - cli drive workflow, preflight feature validation, drive config - transfer flag emission Tests/fixtures that drive raw libacl / exacl FFI directly remain unix-only intentionally; only dispatch through `metadata::sync_acls` gains the Windows code path. Refs #1866 * fix(engine): widen mode parameter cfg for windows+acl path The mode parameter and LocalCopyExecution import in apply_final_directory_metadata were gated on `all(unix, any(feature = "acl", feature = "xattr"))`, but the call site for sync_acls_if_requested is gated on `all(any(unix, windows), feature = "acl")`. When building on Windows with the acl feature enabled (without xattr), `mode` was not in scope, causing E0425 in CI. Widen both gates to also include `all(windows, feature = "acl")` so the Windows + acl combination compiles. * fix(engine): widen call-site cfg for windows+acl mode arg The callee apply_final_directory_metadata accepts `mode` under `any(unix+acl|xattr, windows+acl)` but the caller was passing it under the narrower `unix+acl|xattr` gate. On windows+acl the call passed 5 args instead of 6, causing E0061. Match the caller's gate to the callee's.
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
metadata::acl_windows(Win32GetNamedSecurityInfoW/SetNamedSecurityInfoW) implementation into the engine pipeline so--acls/-Anow reaches the Windows code path.cfg(all(unix, feature = "acl"))tocfg(all(any(unix, windows), feature = "acl")). Tests/fixtures that drive raw libacl/exacl FFI remain unix-only.Context
The metadata-layer Windows ACL implementation already existed (commit 9b3a07f) but was unreachable because every engine call site gated ACL handling on
cfg(all(unix, feature = "acl")). SID-to-uid mapping follows upstreamacls.c:902-928. SACLs are intentionally skipped (requireSE_SECURITY_NAMEprivilege).Test plan
oc-rsync -aA src dston Windows preserves DACL ACEs across copyRefs #1866