bpo-30584: Fix test_os fails on non-English Windows#1980
Merged
vstinner merged 3 commits intopython:masterfrom Jun 7, 2017
denis-osipov:fix-issue-30584
Merged
bpo-30584: Fix test_os fails on non-English Windows#1980vstinner merged 3 commits intopython:masterfrom denis-osipov:fix-issue-30584
vstinner merged 3 commits intopython:masterfrom
denis-osipov:fix-issue-30584
Conversation
eryksun
reviewed
Jun 7, 2017
| DETACHED_PROCESS = 8 | ||
| subprocess.check_call( | ||
| ['icacls.exe', fname, '/deny', 'Users:(S)'], | ||
| ['icacls.exe', fname, '/deny', '*S-1-5-32-545:(S)'], |
Contributor
There was a problem hiding this comment.
Yes, using the numeric SID to avoid localized names is correct. Thanks for catching this.
vstinner
reviewed
Jun 7, 2017
| DETACHED_PROCESS = 8 | ||
| subprocess.check_call( | ||
| ['icacls.exe', fname, '/deny', 'Users:(S)'], | ||
| ['icacls.exe', fname, '/deny', '*S-1-5-32-545:(S)'], |
Member
There was a problem hiding this comment.
Please add a comment mentionning the bpo and explaining what is this identifier, like:
# bpo-30584: Use security identifier *S-1-5-32-545 instead of localized "Users"
# to not depend on the locale
vstinner
approved these changes
Jun 7, 2017
vstinner
reviewed
Jun 7, 2017
Member
vstinner
left a comment
There was a problem hiding this comment.
Oh, it's your first contribution. In that case, you should add yourself to Misc/ACKS please!
vstinner
pushed a commit
that referenced
this pull request
Jun 8, 2017
vstinner
pushed a commit
that referenced
this pull request
Jun 8, 2017
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.
On Microsoft Support page Well-known security identifiers in Windows operating systems said:
So I suggest to use SID (*S-1-5-32-545) instead of name (Users).