mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3428] [CLOSED] [Other] Fix Windows child process permissions in adopt_user_defaults #4632
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#4632
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/3428
Author: @kossum
Created: 10/20/2026
Status: ❌ Closed
Base:
main← Head:fix/windows-child-process-default-dacl📝 Commits (1)
14b1d8fWindows: fix child process access after adopting user defaults📊 Changes
2 files changed (+35 additions, -1 deletions)
View changed files
📝
strata_control/private_files.py(+4 -1)📝
tests/terminal/test_private_files.py(+31 -0)📄 Description
Problem and result
I ran into this while starting a locally built engine on Windows. The server was healthy, but my PowerShell helper for setting HighQoS kept timing out because it couldn't read
strata.exe's path. TryingOpenProcessdirectly returned error 5 (ERROR_ACCESS_DENIED), even though the engine was running under the same user.The cause is the
FAentries in the token default DACL set byadopt_user_defaults().FAmeansFILE_ALL_ACCESS(0x1f01ff), but that default DACL is also used when creating child processes. The file access mask doesn't include the process query and set-information rights needed here.Changing these entries to
GAlets Windows map the permissions to the object being created. With this change, reopening a child process and setting its QoS works without elevation.Related discussion
None. The
FAtoken default was added indf13760c.Approach
The fix only changes
FAtoGAin the token default DACL. The user, SYSTEM and Administrators entries stay the same. The separate ACLs used to make files private are untouched.The regression test calls
adopt_user_defaults(), starts a Python child, then reopens it withPROCESS_QUERY_LIMITED_INFORMATION | PROCESS_SET_INFORMATIONand callswinjob.no_throttle(). It runs in a separate Python process so it doesn't change the test runner's token defaults.Non-Windows code still returns before this point. There are no engine or GPU backend changes.
Validation
Tested without elevation on Windows 11, build
10.0.26300, with 64-bit Python 3.13.2 (Anaconda) from the project's.venv.The patched tree is based on
9ae93f7b1fe989d04a8e404d32cddaeeff10505f, on branchfix/windows-child-process-default-dacl. Commands were run from the repo root using that environment.Passed:
That's 13 passed, with the POSIX mode-bit test skipped on Windows. This includes the new process-access test and the existing file-ACL tests.
git diff --checkalso passed with no output.Failed:
Before changing the DACL, the new test reproduced the access denial:
That run was before syncing main; the affected
FAcode was unchanged by the sync. The post-fix run above is on the updated base. No failures in that run.Not run:
Limits
The server needs a restart. This doesn't repair the token defaults or ACLs of processes that are already running.
The test checks that reopening the child and setting QoS succeed; it doesn't read back the throttling state. This also doesn't mean Strata's built-in QoS setup was failing: it uses the handle returned when the child is created, rather than reopening it by PID.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.