php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #68526
Patch posix-acl.patch revision 2014-11-30 17:34 UTC by remi@php.net
revision 2014-11-30 16:50 UTC by remi@php.net
revision 2014-11-30 10:31 UTC by remi@php.net
revision 2014-11-30 09:56 UTC by remi@php.net
revision 2014-11-30 09:44 UTC by remi@php.net
revision 2014-11-30 09:21 UTC by remi@php.net
revision 2014-11-30 08:35 UTC by remi@php.net

Patch posix-acl.patch for FPM related Bug #68526

Patch version 2014-11-30 09:21 UTC

Return to Bug #68526 | Download this patch
This patch is obsolete

Obsoleted by patches:

This patch renders other patches obsolete

Obsolete patches:

Patch Revisions: 2014-11-30 17:34 UTC | 2014-11-30 16:50 UTC | 2014-11-30 10:31 UTC | 2014-11-30 09:56 UTC | 2014-11-30 09:44 UTC | 2014-11-30 09:21 UTC | 2014-11-30 08:35 UTC

Developer: remi@php.net



   
   struct ini_value_parser_s {
  diff -ru /home/php/php-src/sapi/fpm/fpm/fpm_unix.c sapi/fpm/fpm/fpm_unix.c
  --- /home/php/php-src/sapi/fpm/fpm/fpm_unix.c	2014-11-29 16:52:25.000000000 +0100
 +++ sapi/fpm/fpm/fpm_unix.c	2014-11-30 10:44:03.491192568 +0100
 +++ sapi/fpm/fpm/fpm_unix.c	2014-11-30 10:20:13.909061059 +0100
  @@ -21,6 +21,10 @@
   #include <sys/apparmor.h>
   #endif
   


  +
   	if (c->listen_owner && *c->listen_owner) {
   		struct passwd *pwd;
   
 @@ -78,15 +193,65 @@
 @@ -78,9 +193,48 @@
   
   int fpm_unix_set_socket_premissions(struct fpm_worker_pool_s *wp, const char *path) /* {{{ */
   {
  +#ifdef HAVE_FPM_ACL


  +			zlog(ZLOG_SYSERROR, "[pool %s] failed to chown() the socket '%s'", wp->config->name, wp->config->listen_address);
   			return -1;
   		}
   	}
  	return 0;
 @@ -88,6 +242,16 @@
   }
   /* }}} */
 +
  
  +int fpm_unix_free_socket_premissions(struct fpm_worker_pool_s *wp) /* {{{ */
  +{
  +#ifdef HAVE_FPM_ACL
  +	if (wp->socket_acl) {
 +		return acl_free(wp->socket_acl);
 +		acl_free(wp->socket_acl);
  +	}
  +#endif
 +	return 0;
  +}
  +/* }}} */
  
 +
   static int fpm_unix_conf_wp(struct fpm_worker_pool_s *wp) /* {{{ */
   {
  	struct passwd *pwd;
  diff -ru /home/php/php-src/sapi/fpm/fpm/fpm_unix.h sapi/fpm/fpm/fpm_unix.h
  --- /home/php/php-src/sapi/fpm/fpm/fpm_unix.h	2014-11-29 16:52:25.000000000 +0100
  +++ sapi/fpm/fpm/fpm_unix.h	2014-11-30 08:26:06.904956526 +0100
  @@ -9,6 +9,8 @@
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 11:01:30 2024 UTC