com php-src: fix indentation: sapi/fpm/config.m4 sapi/fpm/fpm/fpm.c sapi/fpm/fpm/fpm.h sapi/fpm/fpm/fpm_conf.c sapi/fpm/fpm/f pm_conf.h
sapi/fpm/fpm/fpm_main.c sapi/fpm/fpm/fpm _unix.c
| From: | Antony Dovgal | Date: | Fri, 17 Jan 2014 08:49:21 +0000 |
| Subject: | com php-src: fix indentation: sapi/fpm/config.m4 sapi/fpm/fpm/fpm.c sapi/fpm/fpm/fpm.h sapi/fpm/fpm/fpm_conf.c sapi/fpm/fpm/f pm_conf.h sapi/fpm/fpm/fpm_main.c sapi/fpm/fpm/fpm _unix.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-75660@lists.php.net to get a copy of this message | ||
Commit: 98e6c8ca2db38b2f129de15e6a4ee4e96c1b6f7a
Author: Antony Dovgal <tony2001@php.net> Thu, 16 Jan 2014 17:53:40 +0400
Committer: Antony Dovgal <tony@daylessday.org> Fri, 17 Jan 2014 12:49:21 +0400
Parents: dff0d51243d372b1efd30c7121f30fd2ef636b99
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=98e6c8ca2db38b2f129de15e6a4ee4e96c1b6f7a
Log:
fix indentation
Changed paths:
M sapi/fpm/config.m4
M sapi/fpm/fpm/fpm.c
M sapi/fpm/fpm/fpm.h
M sapi/fpm/fpm/fpm_conf.c
M sapi/fpm/fpm/fpm_conf.h
M sapi/fpm/fpm/fpm_main.c
M sapi/fpm/fpm/fpm_unix.c
Diff:
diff --git a/sapi/fpm/config.m4 b/sapi/fpm/config.m4
index ba2b8e2..40cd69c 100644
--- a/sapi/fpm/config.m4
+++ b/sapi/fpm/config.m4
@@ -538,18 +538,18 @@ dnl }}}
AC_DEFUN([AC_FPM_APPARMOR],
[
- AC_MSG_CHECKING([for apparmor])
-
- SAVED_LIBS="$LIBS"
- LIBS="$LIBS -lapparmor"
-
- AC_TRY_LINK([ #include <sys/apparmor.h> ], [change_hat("test", 0);], [
- AC_DEFINE([HAVE_APPARMOR], 1, [do we have apparmor support?])
- AC_MSG_RESULT([yes])
- ], [
- LIBS="$SAVED_LIBS"
- AC_MSG_RESULT([no])
- ])
+ AC_MSG_CHECKING([for apparmor])
+
+ SAVED_LIBS="$LIBS"
+ LIBS="$LIBS -lapparmor"
+
+ AC_TRY_LINK([ #include <sys/apparmor.h> ], [change_hat("test", 0);], [
+ AC_DEFINE([HAVE_APPARMOR], 1, [do we have apparmor support?])
+ AC_MSG_RESULT([yes])
+ ], [
+ LIBS="$SAVED_LIBS"
+ AC_MSG_RESULT([no])
+ ])
])
@@ -563,15 +563,15 @@ if test "$PHP_FPM" != "no"; then
AC_FPM_TRACE
AC_FPM_BUILTIN_ATOMIC
AC_FPM_LQ
- AC_FPM_SYSCONF
- AC_FPM_TIMES
- AC_FPM_KQUEUE
- AC_FPM_PORT
- AC_FPM_DEVPOLL
- AC_FPM_EPOLL
- AC_FPM_POLL
- AC_FPM_SELECT
- AC_FPM_APPARMOR
+ AC_FPM_SYSCONF
+ AC_FPM_TIMES
+ AC_FPM_KQUEUE
+ AC_FPM_PORT
+ AC_FPM_DEVPOLL
+ AC_FPM_EPOLL
+ AC_FPM_POLL
+ AC_FPM_SELECT
+ AC_FPM_APPARMOR
PHP_ARG_WITH(fpm-user,,
[ --with-fpm-user[=USER] Set the user for php-fpm to run as. (default: nobody)], nobody, no)
diff --git a/sapi/fpm/fpm/fpm.c b/sapi/fpm/fpm/fpm.c
index abfc786..96a29c5 100644
--- a/sapi/fpm/fpm/fpm.c
+++ b/sapi/fpm/fpm/fpm.c
@@ -39,7 +39,7 @@ struct fpm_globals_s fpm_globals = {
.test_successful = 0,
.heartbeat = 0,
.run_as_root = 0,
- .force_stderr = 0,
+ .force_stderr = 0,
.send_config_pipe = {0, 0},
};
@@ -53,7 +53,7 @@ int fpm_init(int argc, char **argv, char *config, char *prefix, char *pid, int t
fpm_globals.prefix = prefix;
fpm_globals.pid = pid;
fpm_globals.run_as_root = run_as_root;
- fpm_globals.force_stderr = force_stderr;
+ fpm_globals.force_stderr = force_stderr;
if (0 > fpm_php_init_main() ||
0 > fpm_stdio_init_main() ||
diff --git a/sapi/fpm/fpm/fpm.h b/sapi/fpm/fpm/fpm.h
index 68642a9..4916140 100644
--- a/sapi/fpm/fpm/fpm.h
+++ b/sapi/fpm/fpm/fpm.h
@@ -55,7 +55,7 @@ struct fpm_globals_s {
int test_successful;
int heartbeat;
int run_as_root;
- int force_stderr;
+ int force_stderr;
int send_config_pipe[2];
};
diff --git a/sapi/fpm/fpm/fpm_conf.c b/sapi/fpm/fpm/fpm_conf.c
index 9b699af..20adf91 100644
--- a/sapi/fpm/fpm/fpm_conf.c
+++ b/sapi/fpm/fpm/fpm_conf.c
@@ -150,7 +150,7 @@ static struct ini_value_parser_s ini_fpm_pool_options[] = {
{ "catch_workers_output", &fpm_conf_set_boolean, WPO(catch_workers_output)
},
{ "security.limit_extensions", &fpm_conf_set_string,
WPO(security_limit_extensions) },
#ifdef HAVE_APPARMOR
- { "apparmor_hat", &fpm_conf_set_string, WPO(apparmor_hat)
},
+ { "apparmor_hat", &fpm_conf_set_string, WPO(apparmor_hat) },
#endif
{ 0, 0, 0 }
};
@@ -648,7 +648,7 @@ int fpm_worker_pool_config_free(struct fpm_worker_pool_config_s *wpc) /* {{{ */
free(wpc->chdir);
free(wpc->security_limit_extensions);
#ifdef HAVE_APPARMOR
- free(wpc->apparmor_hat);
+ free(wpc->apparmor_hat);
#endif
for (kv = wpc->php_values; kv; kv = kv_next) {
diff --git a/sapi/fpm/fpm/fpm_conf.h b/sapi/fpm/fpm/fpm_conf.h
index 8cd8690..4b29749 100644
--- a/sapi/fpm/fpm/fpm_conf.h
+++ b/sapi/fpm/fpm/fpm_conf.h
@@ -88,7 +88,7 @@ struct fpm_worker_pool_config_s {
struct key_value_s *php_admin_values;
struct key_value_s *php_values;
#ifdef HAVE_APPARMOR
- char *apparmor_hat;
+ char *apparmor_hat;
#endif
};
diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c
index fccb80c..9309083 100644
--- a/sapi/fpm/fpm/fpm_main.c
+++ b/sapi/fpm/fpm/fpm_main.c
@@ -157,7 +157,7 @@ static const opt_struct OPTIONS[] = {
{'R', 0, "allow-to-run-as-root"},
{'D', 0, "daemonize"},
{'F', 0, "nodaemonize"},
- {'O', 0, "force-stderr"},
+ {'O', 0, "force-stderr"},
{'-', 0, NULL} /* end of args */
};
@@ -1575,7 +1575,7 @@ int main(int argc, char *argv[])
char *fpm_pid = NULL;
int test_conf = 0;
int force_daemon = -1;
- int force_stderr = 0;
+ int force_stderr = 0;
int php_information = 0;
int php_allow_to_run_as_root = 0;
@@ -1704,9 +1704,9 @@ int main(int argc, char *argv[])
force_daemon = 0;
break;
- case 'O': /* force stderr even on non tty */
- force_stderr = 1;
- break;
+ case 'O': /* force stderr even on non tty */
+ force_stderr = 1;
+ break;
default:
case 'h':
diff --git a/sapi/fpm/fpm/fpm_unix.c b/sapi/fpm/fpm/fpm_unix.c
index 1159a13..b32213f 100644
--- a/sapi/fpm/fpm/fpm_unix.c
+++ b/sapi/fpm/fpm/fpm_unix.c
@@ -228,28 +228,33 @@ int fpm_unix_init_child(struct fpm_worker_pool_s *wp) /* {{{ */
}
#ifdef HAVE_APPARMOR
- if (wp->config->apparmor_hat) {
- char *con, *new_con;
- if (aa_getcon(&con, NULL) == -1) {
- zlog(ZLOG_SYSERROR, "[pool %s] failed to query apparmor confinement. Please
check if \"/proc/*/attr/current\" is read and writeable.", wp->config->name);
- return -1;
- }
- new_con = malloc(strlen(con) + strlen(wp->config->apparmor_hat) + 3); // // + 0
Byte
- if (!new_con) {
- zlog(ZLOG_SYSERROR, "[pool %s] failed to allocate memory for apparmor hat
change.", wp->config->name);
- return -1;
- }
- if (0 > sprintf(new_con, "%s//%s", con, wp->config->apparmor_hat)) {
- zlog(ZLOG_SYSERROR, "[pool %s] failed to construct apparmor
confinement.", wp->config->name);
- return -1;
- }
- if (0 > aa_change_profile(new_con)) {
- zlog(ZLOG_SYSERROR, "[pool %s] failed to change to new confinement (%s).
Please check if \"/proc/*/attr/current\" is read and writeable and \"change_profile
-> %s//*\" is allowed.", wp->config->name, new_con, con);
- return -1;
- }
- free(con);
- free(new_con);
- }
+ if (wp->config->apparmor_hat) {
+ char *con, *new_con;
+
+ if (aa_getcon(&con, NULL) == -1) {
+ zlog(ZLOG_SYSERROR, "[pool %s] failed to query apparmor confinement. Please check if
\"/proc/*/attr/current\" is read and writeable.", wp->config->name);
+ return -1;
+ }
+
+ new_con = malloc(strlen(con) + strlen(wp->config->apparmor_hat) + 3); // // + 0 Byte
+ if (!new_con) {
+ zlog(ZLOG_SYSERROR, "[pool %s] failed to allocate memory for apparmor hat change.",
wp->config->name);
+ return -1;
+ }
+
+ if (0 > sprintf(new_con, "%s//%s", con, wp->config->apparmor_hat)) {
+ zlog(ZLOG_SYSERROR, "[pool %s] failed to construct apparmor confinement.",
wp->config->name);
+ return -1;
+ }
+
+ if (0 > aa_change_profile(new_con)) {
+ zlog(ZLOG_SYSERROR, "[pool %s] failed to change to new confinement (%s). Please check if
\"/proc/*/attr/current\" is read and writeable and \"change_profile ->
%s//*\" is allowed.", wp->config->name, new_con, con);
+ return -1;
+ }
+
+ free(con);
+ free(new_con);
+ }
#endif
return 0;