Req #77062 [Asn->Csd]: Allow numeric [UG]ID in FPM listen.{owner,group}

From: Date: Sun, 29 Mar 2020 19:31:35 +0000
Subject: Req #77062 [Asn->Csd]: Allow numeric [UG]ID in FPM listen.{owner,group}
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-226325@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77062&edit=1

 ID:                 77062
 Updated by:         bukka@php.net
 Reported by:        Andreas dot Ley at kit dot edu
-Summary:            In FPM config, user accepts numerical uid, but
                     listen.owner doesn't
+Summary:            Allow numeric [UG]ID in FPM listen.{owner,group}
-Status:             Assigned
+Status:             Closed
 Type:               Feature/Change Request
 Package:            FPM related
 Operating System:   Linux
 PHP Version:        7.3.0RC4
 Assigned To:        bukka
 Block user comment: N
 Private report:     N

 New Comment:

Merged to 7.4 in https://github.com/php/php-src/commit/0b4e80b8c1462a17ab758e600e2a5ddb39d80c06


Previous Comments:
------------------------------------------------------------------------
[2020-02-04 13:20:39] andrenth at gmail dot com

The following pull request has been associated:

Patch Name: Allow numeric [UG]ID in FPM listen.{owner,group}
On GitHub:  https://github.com/php/php-src/pull/5148
Patch:      https://github.com/php/php-src/pull/5148.patch

------------------------------------------------------------------------
[2018-10-25 20:06:10] Andreas dot Ley at kit dot edu

Description:
------------
When configuring the FPM, a config option like

user = 12345

is valid, but

listen.owner = 12345

provokes a 'cannot get uid for user' error message

The code to be fixed is in sapi/fpm/fpm/fpm_unix.c where fpm_unix_conf_wp() has a check for a
numerical value but fpm_unix_resolve_socket_premissions() [which looks like a typo to me]
hasn't.

I added a simple patch to port this functionality to fpm_unix_resolve_socket_premissions(); if this
will be accepted, a similar change might be favorable for the acl options, too.

Background: This helps to avoid getpwnam() in situations with a not-so-stable LDAP server...



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=77062&edit=1


Thread (3 messages)

« previous php.bugs (#226325) next »