Skip to content

Commit 4628c05

Browse files
authored
Skip downgraded privilege test for non-root users (#4)
This test requires both posix ext and root account to be able to change uid.
1 parent 0188855 commit 4628c05

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/006.phpt

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
--TEST--
22
fopen without privileges
33
--SKIPIF--
4-
<?php if (!extension_loaded('pcap')) { echo 'skip'; } ?>
4+
<?php
5+
if (!extension_loaded('pcap')) { echo 'skip pcap ext not loaded'; }
6+
if (!extension_loaded('posix')) { echo 'skip posix not loaded'; }
7+
if (posix_getuid()) { echo 'skip root only'; }
8+
?>
59
--FILE--
610
<?php
711

0 commit comments

Comments
 (0)