Repository navigation
bootloader: make creation of temporary directories AppContainer-aware - #8291
Merged
Merged
Conversation
Refactor `pyi_win32_mkdir` to use pre-initialized security descriptor, instead of constructing descriptor string and parsing it on each call. This also avoids querying user SID on every call. The shared security descriptor must be now explicitly initialized using `pyi_win32_initialize_security_descriptor` before first call to `pyi_win32_mkdir` is made, and freed using `pyi_win32_free_security_descriptor` when not needed anymore (after extraction to temporary directory is complete).
Make bootloader codepaths involved in creation of temporary directories for `onefile` builds AppContainer-aware. If the process runs inside an AppContainer, the temporary directory's DACL needs to explicitly include the AppContainerSID, otherwise the directory becomes inaccessible to the process.
bwoodsend
approved these changes
Feb 7, 2024
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Make bootloader codepaths involved in creation of temporary directories for
onefilebuilds on Windows AppContainer-aware. If the process runs inside an AppContainer, the temporary directory's DACL needs to explicitly include the AppContainerSID, otherwise the directory becomes inaccessible to the process. This is bootloader equivalent of #8290.Refactor
pyi_win32_mkdirto use pre-initialized security descriptor, instead of constructing descriptor string and parsing it on each call. This also avoids querying user SID and AppContainer SID on every call.