diff options
| author | Ben Fuhrmannek | 2021-02-16 11:16:59 +0100 |
|---|---|---|
| committer | Ben Fuhrmannek | 2021-02-16 11:16:59 +0100 |
| commit | 5484bcb5eb2714e7438927e2566c86a74d7c51af (patch) | |
| tree | b78326d2999397be4c08e06b23209981f82a4ea9 /src/tests/deny_writable/deny_writable_execution_simulation.phpt | |
| parent | 7ac1e3866ef4f146c6c93a5ca13b9aebb14e936a (diff) | |
| parent | cecfdd808da67be908dbe7144cc8c74dfb3f855e (diff) | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/tests/deny_writable/deny_writable_execution_simulation.phpt')
| -rw-r--r-- | src/tests/deny_writable/deny_writable_execution_simulation.phpt | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/tests/deny_writable/deny_writable_execution_simulation.phpt b/src/tests/deny_writable/deny_writable_execution_simulation.phpt index b03bc8f..30f8cb1 100644 --- a/src/tests/deny_writable/deny_writable_execution_simulation.phpt +++ b/src/tests/deny_writable/deny_writable_execution_simulation.phpt | |||
| @@ -1,8 +1,9 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Readonly execution attempt (simulation mode) | 2 | Readonly execution attempt (simulation mode) |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 4 | <?php | 5 | <?php |
| 5 | if (!extension_loaded("snuffleupagus")) print "skip"; | 6 | if (!extension_loaded("snuffleupagus")) { print "skip" }; |
| 6 | 7 | ||
| 7 | // root has write privileges on any file | 8 | // root has write privileges on any file |
| 8 | if (TRUE == function_exists("posix_getuid")) { | 9 | if (TRUE == function_exists("posix_getuid")) { |
| @@ -17,6 +18,7 @@ if (TRUE == function_exists("posix_getuid")) { | |||
| 17 | ?> | 18 | ?> |
| 18 | --INI-- | 19 | --INI-- |
| 19 | sp.configuration_file={PWD}/config/config_disable_writable_simulation.ini | 20 | sp.configuration_file={PWD}/config/config_disable_writable_simulation.ini |
| 21 | --XFAIL-- | ||
| 20 | --FILE-- | 22 | --FILE-- |
| 21 | <?php | 23 | <?php |
| 22 | $dir = __DIR__; | 24 | $dir = __DIR__; |
| @@ -41,10 +43,10 @@ unlink("$dir/non_writable_file.txt"); | |||
| 41 | unlink("$dir/writable_file.txt"); | 43 | unlink("$dir/writable_file.txt"); |
| 42 | ?> | 44 | ?> |
| 43 | --EXPECTF-- | 45 | --EXPECTF-- |
| 44 | Warning: [snuffleupagus][0.0.0.0][readonly_exec] Attempted execution of a writable file (%a/deny_writable_execution_simulation.php). in %a/deny_writable_execution_simulation.php on line 2 | 46 | Warning: [snuffleupagus][0.0.0.0][readonly_exec][simulation] Attempted execution of a writable file (%a/deny_writable_execution_simulation.php). in %a/deny_writable_execution_simulation.php on line 2 |
| 45 | 47 | ||
| 46 | Warning: [snuffleupagus][0.0.0.0][readonly_exec] Attempted execution of a writable file (%a/writable_file.txt). in %a/deny_writable_execution_simulation.php on line 12 | 48 | Warning: [snuffleupagus][0.0.0.0][readonly_exec][simulation] Attempted execution of a writable file (%a/writable_file.txt). in %a/deny_writable_execution_simulation.php on line 12 |
| 47 | 49 | ||
| 48 | Warning: [snuffleupagus][0.0.0.0][readonly_exec] Attempted execution of a writable file (%a/writable_file.txt). in %a/writable_file.txt on line 1 | 50 | Warning: [snuffleupagus][0.0.0.0][readonly_exec][simulation] Attempted execution of a writable file (%a/writable_file.txt). in %a/writable_file.txt on line 1 |
| 49 | Code execution within a writable file. | 51 | Code execution within a writable file. |
| 50 | Code execution within a non-writable file. | 52 | Code execution within a non-writable file. |
