Skip to content
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
bartonjs:unix_x509store_perms_rc2
Closed

[RC2] Fix Unix X509Store directory permissions check#7753
bartonjs wants to merge 1 commit intodotnet:release/1.0.0-rc2from
bartonjs:unix_x509store_perms_rc2

Conversation

@bartonjs
Copy link
Member

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)

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.
@ellismg
Copy link
Contributor

ellismg commented Apr 14, 2016

@dotnet-bot test this please (I believe I have fixed the RC2 PR infrastructure issues)

@bartonjs
Copy link
Member Author

The incidence is low, and the workaround is easy, so closing this request as not meeting the RC2 porting bar.

@bartonjs bartonjs closed this Apr 14, 2016
@bartonjs bartonjs removed their assignment Nov 15, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants