]> granicus.if.org Git - python/commitdiff
[3.5] bpo-30584: Fix test_os fails on non-English Windows (GH-1980) (#2000)
authorDenis Osipov <osipov_d@list.ru>
Thu, 8 Jun 2017 12:16:48 +0000 (17:16 +0500)
committerVictor Stinner <victor.stinner@gmail.com>
Thu, 8 Jun 2017 12:16:48 +0000 (14:16 +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 10383cfc1f0e9358c52eef194eb96cdaec311ec9..5865783a43e9f251efeaa1349c903817eccea2c6 100644 (file)
@@ -448,7 +448,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 53f6879535b84d98ca52dee984c038baf7b2ff1e..1ed9e5bc98abf57ac0743008f3e2e29df5d748e3 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -1101,6 +1101,7 @@ William Orr
 Michele Orrù
 Tomáš Orsava
 Oleg Oshmyan
+Denis Osipov
 Denis S. Otkidach
 Peter Otten
 Michael Otteneder