You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by aa...@apache.org on 2001/11/30 02:18:25 UTC

cvs commit: httpd-2.0/modules/generators mod_suexec.c

aaron       01/11/29 17:18:25

  Modified:    modules/generators mod_suexec.c
  Log:
  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 <rm...@covalent.net>, Cliff Woolley
  
  Revision  Changes    Path
  1.11      +11 -3     httpd-2.0/modules/generators/mod_suexec.c
  
  Index: mod_suexec.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/generators/mod_suexec.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- mod_suexec.c	2001/11/29 23:34:09	1.10
  +++ mod_suexec.c	2001/11/30 01:18:25	1.11
  @@ -127,18 +127,26 @@
       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