]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.6] bpo-30584: Fix test_os fails on non-English Windows (GH-1980) (#1999)
authorDenis Osipov <osipov_d@list.ru>
Thu, 8 Jun 2017 12:02:05 +0000 (17:02 +0500)
committerVictor Stinner <victor.stinner@gmail.com>
Thu, 8 Jun 2017 12:02:05 +0000 (14:02 +0200)
* 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
Misc/ACKS

index e9fdb0719f4bf4267d0c51bbbe5f53e861bcb6f6..46ad2099a9f5249117e4d2eed4dee4bda7b23ce3 100644 (file)
@@ -473,7 +473,9 @@ class StatAttributeTests(unittest.TestCase):
         # 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)
index bbdc69d9c9fd642e21f1f4750ac0b0efddd2efb7..c2ebf7faa40a9e85a799698b56c4bd597c76253d 100644 (file)
--- 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