Repository navigation
feat(metadata): wire --acls to Windows DACL (#2310) - #4388
Merged
Merged
Conversation
oferchen
force-pushed
the
feat/windows-acls-cli-wiring
branch
from
May 18, 2026 00:11
fcd3ef0 to
63e619a
Compare
4 tasks done
oferchen
added a commit
that referenced
this pull request
May 18, 2026
…AS-7 #2312) Adds crates/metadata/tests/windows_to_linux_acl_roundtrip.rs covering the receiver-side apply_xattrs_from_list dispatch for the reserved user.win32.security_descriptor xattr slot (WAS-5, PR #4388). - simulated_windows_xattr_dropped_on_linux: hand-crafts an XattrEntry with the reserved name + two standard user.* slots, feeds it through apply_xattrs_from_list against a TempDir file, and tolerates both the WAS-5 strict-drop arm and the pre-WAS-5 verbatim-store fallback so the test does not flake against in-flight master. - simulated_windows_xattr_applied_on_windows: cfg(target_os = windows), apply the reserved slot then read the DACL back via read_dacl_sddl. - pure_posix_acl_roundtrip_unaffected_by_reserved_slot: standard user.* payload, no reserved slot; standard slots applied and the reserved name does not appear in the destination. Sibling to the workspace-root tests/acl_windows_to_linux_roundtrip.rs which pins the pure-mapping contract. This file exercises the xattr application path, gated on feature = acl + feature = xattr, hermetic via tempdir().
oferchen
force-pushed
the
feat/windows-acls-cli-wiring
branch
from
May 18, 2026 00:57
63e619a to
7553de3
Compare
oferchen
added a commit
that referenced
this pull request
May 18, 2026
…AS-7 #2312) Adds crates/metadata/tests/windows_to_linux_acl_roundtrip.rs covering the receiver-side apply_xattrs_from_list dispatch for the reserved user.win32.security_descriptor xattr slot (WAS-5, PR #4388). - simulated_windows_xattr_dropped_on_linux: hand-crafts an XattrEntry with the reserved name + two standard user.* slots, feeds it through apply_xattrs_from_list against a TempDir file, and tolerates both the WAS-5 strict-drop arm and the pre-WAS-5 verbatim-store fallback so the test does not flake against in-flight master. - simulated_windows_xattr_applied_on_windows: cfg(target_os = windows), apply the reserved slot then read the DACL back via read_dacl_sddl. - pure_posix_acl_roundtrip_unaffected_by_reserved_slot: standard user.* payload, no reserved slot; standard slots applied and the reserved name does not appear in the destination. Sibling to the workspace-root tests/acl_windows_to_linux_roundtrip.rs which pins the pure-mapping contract. This file exercises the xattr application path, gated on feature = acl + feature = xattr, hermetic via tempdir().
oferchen
added a commit
that referenced
this pull request
May 18, 2026
…AS-7 #2312) (#4420) Adds crates/metadata/tests/windows_to_linux_acl_roundtrip.rs covering the receiver-side apply_xattrs_from_list dispatch for the reserved user.win32.security_descriptor xattr slot (WAS-5, PR #4388). - simulated_windows_xattr_dropped_on_linux: hand-crafts an XattrEntry with the reserved name + two standard user.* slots, feeds it through apply_xattrs_from_list against a TempDir file, and tolerates both the WAS-5 strict-drop arm and the pre-WAS-5 verbatim-store fallback so the test does not flake against in-flight master. - simulated_windows_xattr_applied_on_windows: cfg(target_os = windows), apply the reserved slot then read the DACL back via read_dacl_sddl. - pure_posix_acl_roundtrip_unaffected_by_reserved_slot: standard user.* payload, no reserved slot; standard slots applied and the reserved name does not appear in the destination. Sibling to the workspace-root tests/acl_windows_to_linux_roundtrip.rs which pins the pure-mapping contract. This file exercises the xattr application path, gated on feature = acl + feature = xattr, hermetic via tempdir().
oferchen
force-pushed
the
feat/windows-acls-cli-wiring
branch
2 times, most recently
from
May 18, 2026 01:19
3125751 to
15ebf05
Compare
Routes the `--acls` apply path through `acl_windows::read_dacl_sddl` / `write_dacl_sddl` on Windows so DACL preservation rides the SDDL fidelity payload from WAS-2/3 (#4354) instead of re-encoding only the named ACEs. Cross-platform interop keeps the WAS-4 (#4361) `dacl_to_posix_mode` and `posix_mode_to_dacl` helpers as the lossy fall-back when one peer is POSIX. Wire format reserves `user.win32.security_descriptor` (matches Samba's NT-ACL slot on Linux backends) inside the existing xattr stream. The sender appends an `XattrEntry` with the source's SDDL via `metadata::sddl_xattr_entry`; the receiver consumes it in `apply_xattrs_from_list`, dispatching to `write_dacl_sddl` on Windows and silently dropping the slot on POSIX so the cross-platform rsync ACL payload from `crates/protocol/src/acl/wire` still drives the lowered POSIX bits. Local Windows-to-Windows `sync_acls` likewise prefers the SDDL round-trip and falls back to the named-ACE encoder only on volumes that refuse to serve a descriptor (FAT32, network mounts). Tests cover the new helpers on every platform and round-trip a custom DACL through a Windows tempdir under `#[cfg(windows)]` so the new dispatch shape is exercised end-to-end on `windows-latest` nextest.
oferchen
force-pushed
the
feat/windows-acls-cli-wiring
branch
from
May 18, 2026 01:24
15ebf05 to
e983ec4
Compare
This was referenced May 18, 2026
oferchen
added a commit
that referenced
this pull request
May 18, 2026
…AS-7 #2312) (#4420) Adds crates/metadata/tests/windows_to_linux_acl_roundtrip.rs covering the receiver-side apply_xattrs_from_list dispatch for the reserved user.win32.security_descriptor xattr slot (WAS-5, PR #4388). - simulated_windows_xattr_dropped_on_linux: hand-crafts an XattrEntry with the reserved name + two standard user.* slots, feeds it through apply_xattrs_from_list against a TempDir file, and tolerates both the WAS-5 strict-drop arm and the pre-WAS-5 verbatim-store fallback so the test does not flake against in-flight master. - simulated_windows_xattr_applied_on_windows: cfg(target_os = windows), apply the reserved slot then read the DACL back via read_dacl_sddl. - pure_posix_acl_roundtrip_unaffected_by_reserved_slot: standard user.* payload, no reserved slot; standard slots applied and the reserved name does not appear in the destination. Sibling to the workspace-root tests/acl_windows_to_linux_roundtrip.rs which pins the pure-mapping contract. This file exercises the xattr application path, gated on feature = acl + feature = xattr, hermetic via tempdir().
oferchen
added a commit
that referenced
this pull request
May 18, 2026
Routes the `--acls` apply path through `acl_windows::read_dacl_sddl` / `write_dacl_sddl` on Windows so DACL preservation rides the SDDL fidelity payload from WAS-2/3 (#4354) instead of re-encoding only the named ACEs. Cross-platform interop keeps the WAS-4 (#4361) `dacl_to_posix_mode` and `posix_mode_to_dacl` helpers as the lossy fall-back when one peer is POSIX. Wire format reserves `user.win32.security_descriptor` (matches Samba's NT-ACL slot on Linux backends) inside the existing xattr stream. The sender appends an `XattrEntry` with the source's SDDL via `metadata::sddl_xattr_entry`; the receiver consumes it in `apply_xattrs_from_list`, dispatching to `write_dacl_sddl` on Windows and silently dropping the slot on POSIX so the cross-platform rsync ACL payload from `crates/protocol/src/acl/wire` still drives the lowered POSIX bits. Local Windows-to-Windows `sync_acls` likewise prefers the SDDL round-trip and falls back to the named-ACE encoder only on volumes that refuse to serve a descriptor (FAT32, network mounts). Tests cover the new helpers on every platform and round-trip a custom DACL through a Windows tempdir under `#[cfg(windows)]` so the new dispatch shape is exercised end-to-end on `windows-latest` nextest.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
…AS-7 #2312) (#4420) Adds crates/metadata/tests/windows_to_linux_acl_roundtrip.rs covering the receiver-side apply_xattrs_from_list dispatch for the reserved user.win32.security_descriptor xattr slot (WAS-5, PR #4388). - simulated_windows_xattr_dropped_on_linux: hand-crafts an XattrEntry with the reserved name + two standard user.* slots, feeds it through apply_xattrs_from_list against a TempDir file, and tolerates both the WAS-5 strict-drop arm and the pre-WAS-5 verbatim-store fallback so the test does not flake against in-flight master. - simulated_windows_xattr_applied_on_windows: cfg(target_os = windows), apply the reserved slot then read the DACL back via read_dacl_sddl. - pure_posix_acl_roundtrip_unaffected_by_reserved_slot: standard user.* payload, no reserved slot; standard slots applied and the reserved name does not appear in the destination. Sibling to the workspace-root tests/acl_windows_to_linux_roundtrip.rs which pins the pure-mapping contract. This file exercises the xattr application path, gated on feature = acl + feature = xattr, hermetic via tempdir().
oferchen
added a commit
that referenced
this pull request
May 18, 2026
Routes the `--acls` apply path through `acl_windows::read_dacl_sddl` / `write_dacl_sddl` on Windows so DACL preservation rides the SDDL fidelity payload from WAS-2/3 (#4354) instead of re-encoding only the named ACEs. Cross-platform interop keeps the WAS-4 (#4361) `dacl_to_posix_mode` and `posix_mode_to_dacl` helpers as the lossy fall-back when one peer is POSIX. Wire format reserves `user.win32.security_descriptor` (matches Samba's NT-ACL slot on Linux backends) inside the existing xattr stream. The sender appends an `XattrEntry` with the source's SDDL via `metadata::sddl_xattr_entry`; the receiver consumes it in `apply_xattrs_from_list`, dispatching to `write_dacl_sddl` on Windows and silently dropping the slot on POSIX so the cross-platform rsync ACL payload from `crates/protocol/src/acl/wire` still drives the lowered POSIX bits. Local Windows-to-Windows `sync_acls` likewise prefers the SDDL round-trip and falls back to the named-ACE encoder only on volumes that refuse to serve a descriptor (FAT32, network mounts). Tests cover the new helpers on every platform and round-trip a custom DACL through a Windows tempdir under `#[cfg(windows)]` so the new dispatch shape is exercised end-to-end on `windows-latest` nextest.
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
…AS-7 #2312) (#4420) Adds crates/metadata/tests/windows_to_linux_acl_roundtrip.rs covering the receiver-side apply_xattrs_from_list dispatch for the reserved user.win32.security_descriptor xattr slot (WAS-5, PR #4388). - simulated_windows_xattr_dropped_on_linux: hand-crafts an XattrEntry with the reserved name + two standard user.* slots, feeds it through apply_xattrs_from_list against a TempDir file, and tolerates both the WAS-5 strict-drop arm and the pre-WAS-5 verbatim-store fallback so the test does not flake against in-flight master. - simulated_windows_xattr_applied_on_windows: cfg(target_os = windows), apply the reserved slot then read the DACL back via read_dacl_sddl. - pure_posix_acl_roundtrip_unaffected_by_reserved_slot: standard user.* payload, no reserved slot; standard slots applied and the reserved name does not appear in the destination. Sibling to the workspace-root tests/acl_windows_to_linux_roundtrip.rs which pins the pure-mapping contract. This file exercises the xattr application path, gated on feature = acl + feature = xattr, hermetic via tempdir().
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
Routes the `--acls` apply path through `acl_windows::read_dacl_sddl` / `write_dacl_sddl` on Windows so DACL preservation rides the SDDL fidelity payload from WAS-2/3 (#4354) instead of re-encoding only the named ACEs. Cross-platform interop keeps the WAS-4 (#4361) `dacl_to_posix_mode` and `posix_mode_to_dacl` helpers as the lossy fall-back when one peer is POSIX. Wire format reserves `user.win32.security_descriptor` (matches Samba's NT-ACL slot on Linux backends) inside the existing xattr stream. The sender appends an `XattrEntry` with the source's SDDL via `metadata::sddl_xattr_entry`; the receiver consumes it in `apply_xattrs_from_list`, dispatching to `write_dacl_sddl` on Windows and silently dropping the slot on POSIX so the cross-platform rsync ACL payload from `crates/protocol/src/acl/wire` still drives the lowered POSIX bits. Local Windows-to-Windows `sync_acls` likewise prefers the SDDL round-trip and falls back to the named-ACE encoder only on volumes that refuse to serve a descriptor (FAT32, network mounts). Tests cover the new helpers on every platform and round-trip a custom DACL through a Windows tempdir under `#[cfg(windows)]` so the new dispatch shape is exercised end-to-end on `windows-latest` nextest.
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
--aclsapply path throughacl_windows::read_dacl_sddl/write_dacl_sddl(WAS-2/3, feat(metadata): Windows DACL/SACL SDDL round-trip (#2307, #2308) #4354) so DACL preservation rides the full SDDL fidelity payload instead of re-encoding only the named ACEs.user.win32.security_descriptor(matches Samba's NT-ACL slot) inside the existing xattr stream as the carrier for the SDDL string - no wire-protocol changes.crates/transfer/src/generator/file_list/entry.rs): when--aclsis on and built withfeature = "acl"on Windows, appendsmetadata::sddl_xattr_entry(path)to the per-entryXattrList.crates/metadata/src/xattr.rs::apply_xattrs_from_list): intercepts the reserved slot. On Windows dispatches toapply_sddl_from_xattrs->write_dacl_sddl; on POSIX silently drops it so the standard cross-platform ACL payload (fromcrates/protocol/src/acl/wire) still drives the lowered POSIX bits via WAS-4 (feat(metadata): DACL <-> POSIX permission bit mapping (#2309) #4361)dacl_to_posix_mode.sync_aclsnow prefers the SDDL round-trip and falls back to the lossy named-ACE encoder only on volumes that refuse to serve a descriptor (FAT32, network mounts).dacl_to_posix_mode/posix_mode_to_daclhelpers in alongside the WAS-5 wiring so the dispatch shape is self-contained; this PR can land before or after feat(metadata): DACL <-> POSIX permission bit mapping (#2309) #4361 (overlapping definitions will fold cleanly).Dispatch shape
Test plan
cargo fmt --all).find_sddl_in_xattrs_returns_payload/_returns_none_when_missing/_skips_abbreviated_entriesapply_sddl_from_xattrs_no_payload_is_noopround_trip_full_mode_matrix_preserves_rwx(0o000..=0o777 round-trip via WAS-4 helpers)dacl_to_posix_mode_*set (Everyone, Authenticated Users fallback, deny drop, inherited drop, non-rwx collapse)windows-latest(NTFS):sddl_xattr_entry_round_trips_on_ntfs(seed -> encode -> apply -> read-back)sync_acls_prefers_sddl_round_tripwrite_dacl_sddl_round_trips_known_descriptorstill passes (regression guard).