[php-src] PR #24021: ext/standard: Retry getpwnam_r() on ERANGE in php_get_uid_by_name()

From: Date: Wed, 30 Sep 2026 15:30:45 +0000
Subject: [php-src] PR #24021: ext/standard: Retry getpwnam_r() on ERANGE in php_get_uid_by_name()
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-39000@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/24021 Author: iliaal In ZTS builds, php_get_uid_by_name() retried getpwnam_r() only on EAGAIN, but POSIX reports an undersized buffer as ERANGE, so chown() and lchown() with a user name fail whenever the passwd entry does not fit the sysconf(_SC_GETPW_R_SIZE_MAX) buffer. Every sibling resolver (php_get_gid_by_name(), the posix_getpw*/getgr* functions, php_get_current_user() and the user dir lookup in fopen_wrappers.c) already retries on ERANGE. Because debug builds start from a 1-byte buffer, ZTS debug builds fail every user name lookup, which is what the new test catches.

« previous php.git-pulls (#39000) next »