This repository was archived by the owner on Jan 23, 2023. It is now read-only.
[RC2] Fix Unix X509Store directory permissions check#7753
Closed
bartonjs wants to merge 1 commit intodotnet:release/1.0.0-rc2from
Closed
[RC2] Fix Unix X509Store directory permissions check#7753bartonjs wants to merge 1 commit intodotnet:release/1.0.0-rc2from
bartonjs wants to merge 1 commit intodotnet:release/1.0.0-rc2from
Conversation
Users who create their first X509Store on build 23910 or later will get an exception that the directory has the wrong permissions. No test existed at the time, and manual testing failed to identify the distinction between "continued use" and "initial creation". This changes the permissions check to ensure that the user permissions are correct, and ignores the group and other permissions. The files are explicitly tested for rw?--?--?, and set to rw------- on mismatch, so there is no major concern with the directory being overly readable. It also adjusts the exception message to match the adjusted requirement, and adds a test. This test will still suffer from the x509stores directory already existing on established machines, since otherwise that runs the risk of breaking the user's my and root stores if test cleanup goes awry.
Contributor
|
@dotnet-bot test this please (I believe I have fixed the RC2 PR infrastructure issues) |
Member
Author
|
The incidence is low, and the workaround is easy, so closing this request as not meeting the RC2 porting bar. |
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.
Users who create their first X509Store on build 23910 or later will get an exception that the directory has the wrong permissions. No test existed at the
time, and manual testing failed to identify the distinction between "continued
use" and "initial creation".
This changes the permissions check to ensure that the user permissions are
correct, and ignores the group and other permissions. The files are explicitly
tested for rw?--?--?, and set to rw------- on mismatch, so there is no major
concern with the directory being overly readable. It also adjusts the exception message to match the adjusted requirement, and adds a test.
This test will still suffer from the x509stores directory already existing on
established machines, since otherwise that runs the risk of breaking the
user's my and root stores if test cleanup goes awry.
(RC2 port of commit acee0a2 from #7655)