diff options
author | Fabien Villepinte <fabien.villepinte@gmail.com> | 2019-10-05 14:26:33 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-10-08 18:20:13 +0200 |
commit | 8b5c351154284a88152ee3d166a32dc77316a658 (patch) | |
tree | e38e10fe7b65983618ae29a290adea19a97f005d /ext/standard/tests/file/copy_variation15.phpt | |
parent | bea832cbf6b7a06ee65b93902233864c1ac9ec98 (diff) | |
download | php-git-8b5c351154284a88152ee3d166a32dc77316a658.tar.gz |
Avoid file clash in root_check skipifs
Extract root check into skipif_root.inc to share this commonly
repeated logic.
Closes GH-4779.
Diffstat (limited to 'ext/standard/tests/file/copy_variation15.phpt')
-rw-r--r-- | ext/standard/tests/file/copy_variation15.phpt | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/ext/standard/tests/file/copy_variation15.phpt b/ext/standard/tests/file/copy_variation15.phpt index a641a8675a..6b52eb7f9b 100644 --- a/ext/standard/tests/file/copy_variation15.phpt +++ b/ext/standard/tests/file/copy_variation15.phpt @@ -4,15 +4,7 @@ Test copy() function: usage variations - destination dir access perms <?php if(substr(PHP_OS, 0, 3) == 'WIN') die("skip do not run on Windows"); -// Skip if being run by root (files are always readable, writeable and executable) -$filename = __DIR__."/copy_variation15_root_check.tmp"; -$fp = fopen($filename, 'w'); -fclose($fp); -if(fileowner($filename) == 0) { - unlink ($filename); - die('skip cannot be run as root'); -} -unlink($filename); +require __DIR__ . '/../skipif_root.inc'; ?> --FILE-- <?php |