Bug #80198 [Com]: Fail posix_getpwnam, posix_getpwuid, ...

From: Date: Sat, 10 Dec 2022 11:21:14 +0000
Subject: Bug #80198 [Com]: Fail posix_getpwnam, posix_getpwuid, ...
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-243092@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80198&edit=1 ID: 80198 Comment by: Hall565ertha at gmail dot com Reported by: dl at CyberPunk dot ru Summary: Fail posix_getpwnam, posix_getpwuid, ... Status: Open Type: Bug Package: Unknown/Other Function Operating System: All FreeBSD PHP Version: Irrelevant Block user comment: N Private report: N New Comment: Looks like you have the posix_geteuid function available, but not posix_getpwuid. That’s my bad for not checking that both functions exist before using them. I’ll fix this in the next release of the plugin, but for now you might want to look at whether you have the posix extension installed. (https://www.myccpay.me/)github.com Previous Comments: ------------------------------------------------------------------------ [2020-10-07 14:30:14] 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"]=> ... ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=80198&edit=1

« previous php.bugs (#243092) next »