mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
Additional fixs for bug 61746 - prepare/clean acls
This commit is contained in:
parent
680685127f
commit
ec5421d044
@ -8,6 +8,7 @@ skipif();
|
||||
--FILE--
|
||||
<?php
|
||||
include_once __DIR__ . '/common.inc';
|
||||
fix_acls();
|
||||
|
||||
$iteration = array(
|
||||
PHPT_ACL_READ => false,
|
||||
|
@ -8,6 +8,7 @@ skipif();
|
||||
--FILE--
|
||||
<?php
|
||||
include_once __DIR__ . '/common.inc';
|
||||
fix_acls();
|
||||
|
||||
$iteration = array(
|
||||
PHPT_ACL_READ => true,
|
||||
|
@ -8,6 +8,7 @@ skipif();
|
||||
--FILE--
|
||||
<?php
|
||||
include_once __DIR__ . '/common.inc';
|
||||
fix_acls();
|
||||
|
||||
$iteration = array(
|
||||
'tiny.exe' => true,
|
||||
|
@ -10,6 +10,7 @@ skipif();
|
||||
--FILE--
|
||||
<?php
|
||||
include_once __DIR__ . '/common.inc';
|
||||
fix_acls();
|
||||
|
||||
$iteration = array(
|
||||
PHPT_ACL_READ => true,
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user