php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80198 Fail posix_getpwnam, posix_getpwuid, ...
Submitted: 2020-10-07 14:30 UTC Modified: -
From: dl at CyberPunk dot ru Assigned:
Status: Open Package: Unknown/Other Function
PHP Version: Irrelevant OS: All FreeBSD
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: dl at CyberPunk dot ru
New email:
PHP Version: OS:

 

 [2020-10-07 14:30 UTC] dl at CyberPunk dot ru
Description:
------------
All FreeBSD do not implement the function sysconf with arguments _SC_GETGR_R_SIZE_MAX , _SC_GETPW_R_SIZE_MAX.

php use this sysconf() in:
- main/main.c php_get_current_user()
- main/fopen_wrappers.c php_fopen_primary_script()
- ext/posix/posix.c posix_getpwnam(), posix_getpwuid(), posix_getgrnam(), posix_getgrgid()
- ext/standard/filestat.c php_get_uid_by_name(), php_get_gid_by_name()

The problem is the unsuccessful result for these functions.

Eliminated is trivial. patch applied.

Test script:
---------------
<?php var_dump(posix_getpwuid(0)); ?>

Current php-7.4.10

without patch
bool(false)

with patch
array(7) {
  ["name"]=>
  string(4) "root"
  ["passwd"]=>
...


Patches

php_FreeBSD_sysconf (last revision 2020-10-07 14:30 UTC by dl at CyberPunk dot ru)

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Nov 25 20:01:23 2020 UTC