Repository navigation
windows: add native user SID and owner-only ACL APIs - #104
Draft
Dmitriy Vasyura (dmitrivMS) wants to merge 1 commit into
Draft
Dmitriy Vasyura (dmitrivMS) wants to merge 1 commit into
Dmitriy Vasyura (dmitrivMS) wants to merge 1 commit into
Conversation
Expose Windows token lookup and asynchronous protected DACL updates without subprocesses, enabling the fix for microsoft/vscode#332710. Include declarations, documentation and Windows ACL regression tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Author
|
Companion consumer draft: microsoft/vscode#341178. Publish the native API package first, then update the dependency and lockfile in that draft before merging. |
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
Add native APIs needed to avoid
whoami.exeandicacls.exesubprocesses in VS Code's local agent host endpoint setup (microsoft/vscode#332710).getCurrentProcessUserSid()reads the current process token and returns its user SID.setOwnerOnlyAcl(path)asynchronously replaces a file/directory DACL via Win32 APIs. The protected ACL grants inheritable full control to the current process user, SYSTEM and Administrators, preserving ownership and auditing.Validation
Windows x64, Node 24.18.0:
npm rebuild— passed (native addon build).npm run compile— passed.npm test— passed, 39 tests.npm run lint— passed.git diff --check— passed.The ACL test fixture was corrected during final validation to explicitly initialize the pre-existing file with inherited permissions, rather than assume machine-specific defaults. The final full suite passed.
Locally linked into the companion VS Code checkout: targeted Electron tests passed, including a regression asserting metadata publication creates no child processes.
Release coordination
This draft supplies the API for the companion VS Code change. Publish a package version containing these APIs before updating VS Code's dependency and lockfile. No version bump or publication is included here.