From 9514199371ec55c213bdd45ca7fe1c9d2e46f6cf Mon Sep 17 00:00:00 2001 From: Aaron Bannert Date: Thu, 29 Nov 2001 23:34:09 +0000 Subject: [PATCH] Add back in the "suEXEC mechanism enabled (wrapper: /path/to/suexec)" message that we had back in apache-1.3 and is still scattered throughout our docs. Unfortunately, when mod_suexec is a DSO we're going to get this thing twice in our logs. I believe as a side effect of the load-unload-load cycles of our DSOs we're losing the static data segment, which is where the "didn't we already report this" flag lives. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92255 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 4 ++++ modules/generators/mod_suexec.c | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/CHANGES b/CHANGES index 9f1b3cf89c..de16cd5764 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,9 @@ Changes with Apache 2.0.30-dev + *) Add back in the "suEXEC mechanism enabled (wrapper: /path/to/suexec)" + message that we had back in apache-1.3 and still have scattered + throughout our docs. [Aaron Bannert] + *) Prevent the Win32 port from continuing after encountering an error in the command line args to apache. [William Rowe] diff --git a/modules/generators/mod_suexec.c b/modules/generators/mod_suexec.c index e902fd2b20..d233079858 100644 --- a/modules/generators/mod_suexec.c +++ b/modules/generators/mod_suexec.c @@ -56,9 +56,11 @@ * University of Illinois, Urbana-Champaign. */ +#define CORE_PRIVATE #include "httpd.h" #include "http_config.h" #include "http_core.h" +#include "http_log.h" #include "http_request.h" #include "apr_strings.h" #include "unixd.h" @@ -125,6 +127,19 @@ static ap_unix_identity_t *get_suexec_id_doer(const request_rec *r) return cfg->active ? &cfg->ugid : NULL; } +static int suexec_post_config(apr_pool_t *p, apr_pool_t *plog, + apr_pool_t *ptemp, server_rec *s) +{ + static int reported = 0; + if (!reported && unixd_config.suexec_enabled) { + ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, s, + "suEXEC mechanism enabled (wrapper: %s)", SUEXEC_BIN); + reported = 1; + } + + return OK; +} + /* * Define the directives specific to this module. This structure is referenced * later by the 'module' structure. @@ -141,6 +156,7 @@ static const command_rec suexec_cmds[] = static void suexec_hooks(apr_pool_t *p) { ap_hook_get_suexec_identity(get_suexec_id_doer,NULL,NULL,APR_HOOK_MIDDLE); + ap_hook_post_config(suexec_post_config,NULL,NULL,APR_HOOK_MIDDLE); } module AP_MODULE_DECLARE_DATA suexec_module = -- 2.50.1