summaryrefslogtreecommitdiff
path: root/tests/executor/allow_symlink_off.phpt
diff options
context:
space:
mode:
authorStefan Esser2014-02-15 18:09:01 +0100
committerStefan Esser2014-02-15 18:09:01 +0100
commit852601dd1663239ba5907382308cb12897afa37c (patch)
treea9535560313fb6f6bc7cec146094d730be793524 /tests/executor/allow_symlink_off.phpt
parent13d2a1cbba22ead86f54f1764ca4f87857059803 (diff)
Add tests for suhosin.executor.allow_symlink
Diffstat (limited to 'tests/executor/allow_symlink_off.phpt')
-rw-r--r--tests/executor/allow_symlink_off.phpt21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/executor/allow_symlink_off.phpt b/tests/executor/allow_symlink_off.phpt
new file mode 100644
index 0000000..782d818
--- /dev/null
+++ b/tests/executor/allow_symlink_off.phpt
@@ -0,0 +1,21 @@
1--TEST--
2suhosin.executor.allow_symlink=Off
3--SKIPIF--
4<?php if (!function_exists("memory_get_usage")) print "skip PHP not compiled with memory_limit support"; ?>
5--INI--
6error_reporting=E_ALL
7open_basedir=
8suhosin.log.stdout=255
9suhosin.log.script=0
10suhosin.log.syslog=0
11suhosin.log.sapi=0
12suhosin.executor.allow_symlink=Off
13--FILE--
14<?php
15symlink();
16ini_set("open_basedir", ".");
17symlink();
18?>
19--EXPECTF--
20Warning: symlink() expects exactly 2 parameters, 0 given in %s on line 2
21ALERT - symlink called during open_basedir (attacker 'REMOTE_ADDR not set', file '%s', line 4)