]> granicus.if.org Git - apache/commitdiff
Add back in the "suEXEC mechanism enabled (wrapper: /path/to/suexec)"
authorAaron Bannert <aaron@apache.org>
Thu, 29 Nov 2001 23:34:09 +0000 (23:34 +0000)
committerAaron Bannert <aaron@apache.org>
Thu, 29 Nov 2001 23:34:09 +0000 (23:34 +0000)
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
modules/generators/mod_suexec.c

diff --git a/CHANGES b/CHANGES
index 9f1b3cf89c756eb98129f16597ba37271f6dc209..de16cd57648b2096ec11938e1c8805c8b541095c 100644 (file)
--- 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]
 
index e902fd2b203f4c98e9fa7b030a3368d69eaac16e..d233079858a127913d95026c3153309fdcab881f 100644 (file)
  * 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 =