Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpo-30584: Fix test_os fails on non-English Windows#1980

Merged
vstinner merged 3 commits into
python:masterpython/cpython:masterfrom
denis-osipov:fix-issue-30584Copy head branch name to clipboard
Jun 7, 2017
Merged

bpo-30584: Fix test_os fails on non-English Windows#1980
vstinner merged 3 commits into
python:masterpython/cpython:masterfrom
denis-osipov:fix-issue-30584Copy head branch name to clipboard

Conversation

@denis-osipov

Copy link
Copy Markdown
Contributor

On Microsoft Support page Well-known security identifiers in Windows operating systems said:

A security identifier (SID) is a unique value of variable length that is used to identify a security principal or security group in Windows operating systems. Well-known SIDs are a group of SIDs that identify generic users or generic groups. Their values remain constant across all operating systems.

So I suggest to use SID (*S-1-5-32-545) instead of name (Users).

Comment thread Lib/test/test_os.py
DETACHED_PROCESS = 8
subprocess.check_call(
['icacls.exe', fname, '/deny', 'Users:(S)'],
['icacls.exe', fname, '/deny', '*S-1-5-32-545:(S)'],

@eryksun eryksun Jun 7, 2017

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, using the numeric SID to avoid localized names is correct. Thanks for catching this.

Comment thread Lib/test/test_os.py
DETACHED_PROCESS = 8
subprocess.check_call(
['icacls.exe', fname, '/deny', 'Users:(S)'],
['icacls.exe', fname, '/deny', '*S-1-5-32-545:(S)'],

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, it's your first contribution. In that case, you should add yourself to Misc/ACKS please!

@vstinner vstinner merged commit 897bba7 into python:master Jun 7, 2017
@denis-osipov denis-osipov deleted the fix-issue-30584 branch June 7, 2017 17:25
@denis-osipov denis-osipov restored the fix-issue-30584 branch June 7, 2017 17:25
@denis-osipov denis-osipov deleted the fix-issue-30584 branch June 7, 2017 17:27
vstinner pushed a commit that referenced this pull request Jun 8, 2017
…1999)

* Fix bpo-30584

* Adding a comment mentionning the bpo and explaining what is the identifier

* Add Denis Osipov to Misc/ACKS
(cherry picked from commit 897bba7)
vstinner pushed a commit that referenced this pull request Jun 8, 2017
…2000)

* Fix bpo-30584

* Adding a comment mentionning the bpo and explaining what is the identifier

* Add Denis Osipov to Misc/ACKS
(cherry picked from commit 897bba7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.