Commit:    a07d76c0ba57e6471ac5869af0aaa26206baa284
Author:    Jerome Loyet <f...@php.net>         Wed, 23 May 2012 11:31:33 +0200
Parents:   757e3fc3d5ca6d175c829549f256adc98b7c1f46
Branches:  PHP-5.4 master

Link:       
http://git.php.net/?p=php-src.git;a=commitdiff;h=a07d76c0ba57e6471ac5869af0aaa26206baa284

Log:
- Fixed bug #61295 (php-fpm should not fail with commented 'user' for non-root 
start)

Bugs:
https://bugs.php.net/61295

Changed paths:
  M  NEWS
  M  sapi/fpm/fpm/fpm_conf.c


Diff:
diff --git a/NEWS b/NEWS
index ff80183..c8aa208 100644
--- a/NEWS
+++ b/NEWS
@@ -57,6 +57,8 @@ PHP                                                           
             NEWS
 - FPM
   . Fixed bug #61045 (fpm don't send error log to fastcgi clients). (fat)
   . Fixed bug #61835 (php-fpm is not allowed to run as root). (fat)
+  . Fixed bug #61295 (php-fpm should not fail with commented 'user'
+    for non-root start). (fat)
 
 - Libxml:
   . Fixed bug #61617 (Libxml tests failed(ht is already destroyed)).
diff --git a/sapi/fpm/fpm/fpm_conf.c b/sapi/fpm/fpm/fpm_conf.c
index 304076d..0b2c5ae 100644
--- a/sapi/fpm/fpm/fpm_conf.c
+++ b/sapi/fpm/fpm/fpm_conf.c
@@ -723,8 +723,8 @@ static int fpm_conf_process_all_pools() /* {{{ */
                        }
                }
 
-               /* user */
-               if (!wp->config->user) {
+               /* alert if user is not set only if we are not root*/
+               if (!wp->config->user && !geteuid()) {
                        zlog(ZLOG_ALERT, "[pool %s] user has not been defined", 
wp->config->name);
                        return -1;
                }


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to