From ec5421d04403ac3e7b013e65fdd7b3ad6fc82c18 Mon Sep 17 00:00:00 2001 From: Anatoliy Belsky Date: Mon, 30 Apr 2012 14:33:48 +0200 Subject: [PATCH] Additional fixs for bug 61746 - prepare/clean acls --- ext/standard/tests/file/windows_acls/bug44859.phpt | 1 + ext/standard/tests/file/windows_acls/bug44859_2.phpt | 1 + ext/standard/tests/file/windows_acls/bug44859_3.phpt | 1 + ext/standard/tests/file/windows_acls/bug44859_4.phpt | 1 + ext/standard/tests/file/windows_acls/common.inc | 10 ++++++++++ 5 files changed, 14 insertions(+) diff --git a/ext/standard/tests/file/windows_acls/bug44859.phpt b/ext/standard/tests/file/windows_acls/bug44859.phpt index bb22a5cd8e..952b6eb4c4 100644 --- a/ext/standard/tests/file/windows_acls/bug44859.phpt +++ b/ext/standard/tests/file/windows_acls/bug44859.phpt @@ -8,6 +8,7 @@ skipif(); --FILE-- false, diff --git a/ext/standard/tests/file/windows_acls/bug44859_2.phpt b/ext/standard/tests/file/windows_acls/bug44859_2.phpt index 3cc4ed1ba1..d741156baa 100644 --- a/ext/standard/tests/file/windows_acls/bug44859_2.phpt +++ b/ext/standard/tests/file/windows_acls/bug44859_2.phpt @@ -8,6 +8,7 @@ skipif(); --FILE-- true, diff --git a/ext/standard/tests/file/windows_acls/bug44859_3.phpt b/ext/standard/tests/file/windows_acls/bug44859_3.phpt index 7300112fc0..ed57abba07 100644 --- a/ext/standard/tests/file/windows_acls/bug44859_3.phpt +++ b/ext/standard/tests/file/windows_acls/bug44859_3.phpt @@ -8,6 +8,7 @@ skipif(); --FILE-- true, diff --git a/ext/standard/tests/file/windows_acls/bug44859_4.phpt b/ext/standard/tests/file/windows_acls/bug44859_4.phpt index c1768d02e6..954c1004a5 100644 --- a/ext/standard/tests/file/windows_acls/bug44859_4.phpt +++ b/ext/standard/tests/file/windows_acls/bug44859_4.phpt @@ -10,6 +10,7 @@ skipif(); --FILE-- true, diff --git a/ext/standard/tests/file/windows_acls/common.inc b/ext/standard/tests/file/windows_acls/common.inc index 4007ad009d..26fadf31fc 100644 --- a/ext/standard/tests/file/windows_acls/common.inc +++ b/ext/standard/tests/file/windows_acls/common.inc @@ -46,6 +46,16 @@ function get_icacls() return "$sysroot\\System32\\icacls.exe"; } +function fix_acls() { + $user = get_username(); + /* Current user needs to be owner of the test files. As well + all the other users having acls on the files must loose them. + The following fixes this just partially, as dynamically reading + all the users having acls on a file could be sophisticated. */ + exec(get_icacls() . ' . /setowner $user /T /L /Q 2> nul'); + exec(get_icacls() . ' . /remove:g Administrators /T /L /Q 2> nul'); +} + function icacls_set($path, $mode, $perm) { $icacls = get_icacls(); $user = get_username(); -- 2.40.0