You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jw...@apache.org on 2002/05/25 22:10:55 UTC

cvs commit: httpd-2.0/modules/ssl ssl_scache.c

jwoolley    02/05/25 13:10:55

  Modified:    .        CHANGES
               modules/generators mod_suexec.c
               modules/ssl ssl_scache.c
  Log:
  Fix the rest of the apr_pool_userdata_setn() bogosity w.r.t. DSO modules.
  It's totally unsafe to use apr_pool_userdata_setn() in the post_config
  phase of a module, since on some platforms when the DSO gets reloaded
  between phases, the data segment will be at a different address on the
  second phase and the userdata_get() call will fail.
  
  PR: 9413
  Submitted by: Tsuyoshi Sasamoto <na...@super.win.ne.jp>
  
  Revision  Changes    Path
  1.787     +6 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.786
  retrieving revision 1.787
  diff -u -d -u -r1.786 -r1.787
  --- CHANGES	25 May 2002 04:06:35 -0000	1.786
  +++ CHANGES	25 May 2002 20:10:55 -0000	1.787
  @@ -1,5 +1,11 @@
   Changes with Apache 2.0.37
   
  +  *) Fix segfaults at startup on some platforms when mod_auth_digest,
  +     mod_suexec, or mod_ssl were used as DSO's due to the way they
  +     were tracking the current init phase since DSO's get completely
  +     unloaded and reloaded between phases.  PR 9413.
  +     [Tsuyoshi Sasamoto <na...@super.win.ne.jp>, Brad Nicholes]
  +
     *) Fix mod_include's handling of regular expressions in
        "<!--#if" directives [Julius Gawlas <ju...@hp.com>]
   
  
  
  
  1.15      +2 -2      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.14
  retrieving revision 1.15
  diff -u -d -u -r1.14 -r1.15
  --- mod_suexec.c	17 May 2002 11:33:09 -0000	1.14
  +++ mod_suexec.c	25 May 2002 20:10:55 -0000	1.15
  @@ -141,8 +141,8 @@
           ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s,
                        "suEXEC mechanism enabled (wrapper: %s)", SUEXEC_BIN);
   
  -        apr_pool_userdata_setn((void *)1, SUEXEC_POST_CONFIG_USERDATA,
  -                               apr_pool_cleanup_null, s->process->pool);
  +        apr_pool_userdata_set((void *)1, SUEXEC_POST_CONFIG_USERDATA,
  +                              apr_pool_cleanup_null, s->process->pool);
       }
   
       return OK;
  
  
  
  1.14      +2 -2      httpd-2.0/modules/ssl/ssl_scache.c
  
  Index: ssl_scache.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_scache.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -d -u -r1.13 -r1.14
  --- ssl_scache.c	17 May 2002 11:24:17 -0000	1.13
  +++ ssl_scache.c	25 May 2002 20:10:55 -0000	1.14
  @@ -94,8 +94,8 @@
   
           apr_pool_userdata_get(&data, userdata_key, s->process->pool);
           if (!data) {
  -            apr_pool_userdata_setn((const void *)1, userdata_key,
  -                                   apr_pool_cleanup_null, s->process->pool);
  +            apr_pool_userdata_set((const void *)1, userdata_key,
  +                                  apr_pool_cleanup_null, s->process->pool);
               return;
           }
           if (mc->nSessionCacheMode == SSL_SCMODE_SHMHT)