From 799570495a5a1cfa36178144ad3b164f65a639fd Mon Sep 17 00:00:00 2001 From: Aaron Bannert Date: Fri, 30 Nov 2001 01:18:25 +0000 Subject: [PATCH] Only let the "suEXEC enabled" message be printed once, even when we have a DSO that goes through the load-unload-load cycle. Suggested by: Ryan Morgan , Cliff Woolley git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92256 13f79535-47bb-0310-9956-ffa450edef68 --- modules/generators/mod_suexec.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/modules/generators/mod_suexec.c b/modules/generators/mod_suexec.c index d233079858..6c78cff246 100644 --- a/modules/generators/mod_suexec.c +++ b/modules/generators/mod_suexec.c @@ -127,18 +127,26 @@ static ap_unix_identity_t *get_suexec_id_doer(const request_rec *r) return cfg->active ? &cfg->ugid : NULL; } +#define SUEXEC_POST_CONFIG_USERDATA "suexec_post_config_userdata" 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) { + void *reported; + + apr_pool_userdata_get(&reported, SUEXEC_POST_CONFIG_USERDATA, + s->process->pool); + + if ((reported == NULL) && unixd_config.suexec_enabled) { ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, s, "suEXEC mechanism enabled (wrapper: %s)", SUEXEC_BIN); - reported = 1; + + apr_pool_userdata_setn((void *)1, SUEXEC_POST_CONFIG_USERDATA, + apr_pool_cleanup_null, s->process->pool); } return OK; } +#undef SUEXEC_POST_CONFIG_USERDATA /* * Define the directives specific to this module. This structure is referenced -- 2.40.0