summaryrefslogtreecommitdiff
path: root/src/tests/deny_writable/deny_writable_execution_simulation.phpt
diff options
context:
space:
mode:
authorBen Fuhrmannek2021-02-16 11:16:59 +0100
committerBen Fuhrmannek2021-02-16 11:16:59 +0100
commit5484bcb5eb2714e7438927e2566c86a74d7c51af (patch)
treeb78326d2999397be4c08e06b23209981f82a4ea9 /src/tests/deny_writable/deny_writable_execution_simulation.phpt
parent7ac1e3866ef4f146c6c93a5ca13b9aebb14e936a (diff)
parentcecfdd808da67be908dbe7144cc8c74dfb3f855e (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.phpt10
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--
2Readonly execution attempt (simulation mode) 2Readonly execution attempt (simulation mode)
3--SKIPIF-- 3--SKIPIF--
4<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
4<?php 5<?php
5if (!extension_loaded("snuffleupagus")) print "skip"; 6if (!extension_loaded("snuffleupagus")) { print "skip" };
6 7
7// root has write privileges on any file 8// root has write privileges on any file
8if (TRUE == function_exists("posix_getuid")) { 9if (TRUE == function_exists("posix_getuid")) {
@@ -17,6 +18,7 @@ if (TRUE == function_exists("posix_getuid")) {
17 ?> 18 ?>
18--INI-- 19--INI--
19sp.configuration_file={PWD}/config/config_disable_writable_simulation.ini 20sp.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");
41unlink("$dir/writable_file.txt"); 43unlink("$dir/writable_file.txt");
42?> 44?>
43--EXPECTF-- 45--EXPECTF--
44Warning: [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 46Warning: [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
46Warning: [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 48Warning: [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
48Warning: [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 50Warning: [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
49Code execution within a writable file. 51Code execution within a writable file.
50Code execution within a non-writable file. 52Code execution within a non-writable file.