kraghuba Thu Aug 23 09:32:37 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard/tests/file copy_variation9.phpt copy_variation15.phpt Log: fix tests http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation9.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/standard/tests/file/copy_variation9.phpt diff -u php-src/ext/standard/tests/file/copy_variation9.phpt:1.1.2.2 php-src/ext/standard/tests/file/copy_variation9.phpt:1.1.2.3 --- php-src/ext/standard/tests/file/copy_variation9.phpt:1.1.2.2 Mon Aug 20 03:37:39 2007 +++ php-src/ext/standard/tests/file/copy_variation9.phpt Thu Aug 23 09:32:37 2007 @@ -4,6 +4,16 @@ <?php if( (stristr(PHP_OS, "Mac")) || (substr(PHP_OS, 0, 3) == "WIN") ) die("skip do not run on Win/MacOS"); + +// Skip if being run by root (files are always readable, writeable and executable) +$filename = dirname(__FILE__)."/copy_variation9_root_check.tmp"; +$fp = fopen($filename, 'w'); +fclose($fp); +if(fileowner($filename) == 0) { + unlink ($filename); + die('skip...cannot be run as root\n'); +} +unlink($filename); ?> --FILE-- <?php http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation15.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/standard/tests/file/copy_variation15.phpt diff -u php-src/ext/standard/tests/file/copy_variation15.phpt:1.1.2.2 php-src/ext/standard/tests/file/copy_variation15.phpt:1.1.2.3 --- php-src/ext/standard/tests/file/copy_variation15.phpt:1.1.2.2 Mon Aug 20 03:37:39 2007 +++ php-src/ext/standard/tests/file/copy_variation15.phpt Thu Aug 23 09:32:37 2007 @@ -4,6 +4,15 @@ <?php if( (stristr(PHP_OS, "Mac")) || (substr(PHP_OS, 0, 3) == "WIN") ) die("skip do not run on Win/MacOS"); +// Skip if being run by root (files are always readable, writeable and executable) +$filename = dirname(__FILE__)."/copy_variation15_root_check.tmp"; +$fp = fopen($filename, 'w'); +fclose($fp); +if(fileowner($filename) == 0) { + unlink ($filename); + die('skip...cannot be run as root\n'); +} +unlink($filename); ?> --FILE-- <?php
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php