summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-08-10 14:20:37 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-08-10 15:59:02 +0200
commit217d05b18e47400a40ebf4a627a08cf5a164f230 (patch)
tree23cc6da679d46e8b8ec51dfbd504243bde9c9341
parentdad25538f6d7b065723b39c7f8b7fb36cbb83bf5 (diff)
downloadphp-git-217d05b18e47400a40ebf4a627a08cf5a164f230.tar.gz
Check permissions in pcntl_unshare_03.phpt
-rw-r--r--ext/pcntl/tests/pcntl_unshare_03.phpt7
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/pcntl/tests/pcntl_unshare_03.phpt b/ext/pcntl/tests/pcntl_unshare_03.phpt
index b1217b6300..f82f27b719 100644
--- a/ext/pcntl/tests/pcntl_unshare_03.phpt
+++ b/ext/pcntl/tests/pcntl_unshare_03.phpt
@@ -9,10 +9,13 @@ if (!defined("CLONE_NEWNET")) die("skip flag unavailable");
if (posix_getuid() !== 0 &&
(!defined("CLONE_NEWUSER") ||
(pcntl_unshare(CLONE_NEWUSER) == false && pcntl_get_last_error() == PCNTL_EPERM))) {
- die("skip Insufficient previleges to run test");
+ die("skip Insufficient privileges for CLONE_NEWUSER");
+}
+if (@pcntl_unshare(CLONE_NEWNET) == false && pcntl_get_last_error() == PCNTL_EPERM) {
+ die("skip Insufficient privileges for CLONE_NEWPID");
}
if (getenv("SKIP_ONLINE_TESTS")) die("skip online test");
-
+?>
--FILE--
<?php