php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80137 getprotobyname and getprotobynumber fail since there is no /etc/protocols
Submitted: 2020-09-22 19:10 UTC Modified: -
From: sigsegv at makadev dot de Assigned:
Status: Closed Package: Testing related
PHP Version: 8.0Git-2020-09-22 (Git) OS: debian:buster (docker container)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: sigsegv at makadev dot de
New email:
PHP Version: OS:

 

 [2020-09-22 19:10 UTC] sigsegv at makadev dot de
Description:
------------
The following tests fail inside a debian:buster (and most likely other) container because /etc/protocols doesn't exist:

getprotobyname function basic test [ext/standard/tests/network/getprotobyname_basic.phpt]
getprotobynumber function basic test [ext/standard/tests/network/getprotobynumber_basic.phpt]


Expected result:
----------------
the test should be skipped if /etc/protocols doesn't exist

Actual result:
--------------
the test fails:

================================================================================
/home/php-tester/php-src/ext/standard/tests/network/getprotobyname_basic.phpt
================================================================================
bool(false)
================================================================================
001+ bool(false)
001- int(6)
================================================================================



================================================================================
/home/php-tester/php-src/ext/standard/tests/network/getprotobynumber_basic.phpt
================================================================================
bool(false)
================================================================================
001+ bool(false)
001- string(3) "tcp"
================================================================================


Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-09-23 13:13 UTC] sigsegv at makadev dot de
The following pull request has been associated:

Patch Name: Fix #80137: skip getprotobyname() and getprotobynumber() tests on *nix if there is no /etc/protocols file
On GitHub:  https://github.com/php/php-src/pull/6193
Patch:      https://github.com/php/php-src/pull/6193.patch
 [2020-09-29 08:59 UTC] nikic@php.net
Automatic comment on behalf of karbe@celloon.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=f5afd0a8270258fb70f70726ae3ed39780817038
Log: Fix bug #80137
 [2020-09-29 08:59 UTC] nikic@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 09:01:29 2024 UTC