Skip to content

Commit 6d0ea70

Browse files
committed
Check permissions in pcntl_unshare_03.phpt
1 parent 638e182 commit 6d0ea70

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ext/pcntl/tests/pcntl_unshare_03.phpt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@ if (!defined("CLONE_NEWNET")) die("skip flag unavailable");
99
if (posix_getuid() !== 0 &&
1010
(!defined("CLONE_NEWUSER") ||
1111
(pcntl_unshare(CLONE_NEWUSER) == false && pcntl_get_last_error() == PCNTL_EPERM))) {
12-
die("skip Insufficient previleges to run test");
12+
die("skip Insufficient privileges for CLONE_NEWUSER");
13+
}
14+
if (@pcntl_unshare(CLONE_NEWNET) == false && pcntl_get_last_error() == PCNTL_EPERM) {
15+
die("skip Insufficient privileges for CLONE_NEWPID");
1316
}
1417
if (getenv("SKIP_ONLINE_TESTS")) die("skip online test");
15-
18+
?>
1619
--FILE--
1720
<?php
1821

0 commit comments

Comments
 (0)