From fb87f73437d48ab7d2b7628f5330a6a34c4e12aa Mon Sep 17 00:00:00 2001 From: Denis Osipov Date: Wed, 7 Jun 2017 22:15:26 +0500 Subject: [PATCH] [3.6] bpo-30584: Fix test_os fails on non-English Windows (GH-1980) * 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 897bba75632dfce87c355e3cd4700468357715a7) --- Lib/test/test_os.py | 4 +++- Misc/ACKS | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index e9fdb0719f4bf4..46ad2099a9f524 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -473,7 +473,9 @@ def test_access_denied(self): # force CreateFile to fail with ERROR_ACCESS_DENIED. DETACHED_PROCESS = 8 subprocess.check_call( - ['icacls.exe', fname, '/deny', 'Users:(S)'], + # bpo-30584: Use security identifier *S-1-5-32-545 instead + # of localized "Users" to not depend on the locale. + ['icacls.exe', fname, '/deny', '*S-1-5-32-545:(S)'], creationflags=DETACHED_PROCESS ) result = os.stat(fname) diff --git a/Misc/ACKS b/Misc/ACKS index bbdc69d9c9fd64..c2ebf7faa40a9e 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -1121,6 +1121,7 @@ William Orr Michele Orrù Tomáš Orsava Oleg Oshmyan +Denis Osipov Denis S. Otkidach Peter Otten Michael Otteneder