Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
  socket cmsg credential test fixes, "backporting" from the FreeBSD PR.
This commit is contained in:
Joe Watkins 2021-12-21 07:28:09 +01:00
commit 938a81cf01
No known key found for this signature in database
GPG Key ID: F9BA0ADA31CBD89E

View File

@ -14,10 +14,6 @@ die('skip not for AIX');
if (!defined('SO_PASSCRED')) {
die('skip SO_PASSCRED is not defined');
}
--CLEAN--
<?php
$path = __DIR__ . "/socket_cmsg_credentials.sock";
@unlink($path);
--FILE--
<?php
include __DIR__."/mcast_helpers.php.inc";
@ -35,7 +31,7 @@ $s = socket_create(AF_UNIX, SOCK_DGRAM, 0) or die("err");
var_dump($s);
$br = socket_bind($s, $path) or die("err");
var_dump($br);
socket_set_nonblock($sends1) or die("Could not put in non-blocking mode");
socket_set_nonblock($s) or die("Could not put in non-blocking mode");
socket_set_option($s, SOL_SOCKET, SO_PASSCRED, 1) or die("could not set SO_PASSCRED");
@ -57,6 +53,10 @@ print_r($data);
$pid = getmypid();
var_dump($data['control'][0]['data']['pid'] === $pid);
?>
--CLEAN--
<?php
$path = __DIR__ . "/socket_cmsg_credentials.sock";
@unlink($path);
--EXPECTF--
creating send socket
object(Socket)#%d (0) {