mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Check permissions in pcntl_unshare_03.phpt
This commit is contained in:
parent
dad25538f6
commit
217d05b18e
1 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue