mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3406] [CLOSED] [TUI] Tests: compare ACL trustees through the SDDL alias #4620
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4620
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/3406
Author: @jackbapa
Created: 10/20/2026
Status: ❌ Closed
Base:
main← Head:fix/windows-builtin-administrator-sddl-alias📝 Commits (1)
449887aTests: compare ACL trustees through the SDDL alias📊 Changes
1 file changed (+13 additions, -7 deletions)
View changed files
📝
tests/terminal/test_private_files.py(+13 -7)📄 Description
Problem and result
ef5d8ab(the fix for #3302) makes the product code accept the SDDL aliasLA, buttests/terminal/test_private_files.pystill compares the raw DACL text withcurrent_user_sid(). On a host whose account is the built-in Administrator (RID 500) Windows renders that trustee asLA, so five existing tests fail even though the ACL is exactly whatrestrict_to_current_user()wrote:test_a_directory_becomes_private_and_its_children_inherittest_the_effective_acl_is_one_protected_entry_for_the_current_usertest_a_locked_file_is_read_again_after_the_repairtest_a_locked_folder_and_what_is_inside_are_repaired_as_a_treetest_a_folder_made_with_private_mkdir_names_the_user_explicitlyAfter the change those five pass on such a host, and they still check the same thing: one protected ACE naming only the current user, with no Everyone, Users, Authenticated Users, SYSTEM or Administrators entry.
Related discussion
ef5d8ab. This PR does not touch production code; it covers the test gap that remains on a RID 500 host.ef5d8abwas resolved by keeping upstream's_same_sid()/_string_sid()and dropping the local_as_sid()implementation.Approach
A module-level helper
resolved(sddl)rewrites every trustee field throughprivate_files._string_sid()(added upstream inef5d8ab); the assertions then compare the string SID._string_sid()returns its input unchanged when the field is not a resolvable alias, so ordinary accounts and POSIX output are compared exactly as before.No production code is changed.
Validation
Passed:
S-1-5-21-...-500), Python 3.13.9:python -m unittest tests.terminal.test_private_files -vat449887a: 13 tests,OK (skipped=1)(the POSIX test).python -m unittest tests.terminal.test_private_files tests.terminal.test_issues_022 -v: 38 tests,OK (skipped=1).origin/main9de04cd:FAILED (failures=5, skipped=1), the five tests listed above.Failed:
none observed.
Not run:
test_issues_022.py::Issue3302AdministratorAlias.Limits
Only the assertion text is normalised. A trustee alias that
ConvertStringSidToSidWcannot resolve still has to match literally, which is the old behaviour.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.