dgaudet     99/06/01 23:30:07

  Modified:    src      CHANGES
               src/main http_main.c
  Log:
  Piped error logs could cause a segfault if an error occured
  during configuration after a restart.
  
  PR:           4456
  Submitted by: Aidan Cully <[EMAIL PROTECTED]>
  
  Revision  Changes    Path
  1.1364    +4 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1363
  retrieving revision 1.1364
  diff -u -r1.1363 -r1.1364
  --- CHANGES   1999/05/26 18:27:43     1.1363
  +++ CHANGES   1999/06/02 06:30:03     1.1364
  @@ -1,5 +1,9 @@
   Changes with Apache 1.3.7
   
  +  *) Piped error logs could cause a segfault if an error occured
  +     during configuration after a restart.
  +     [Aidan Cully <[EMAIL PROTECTED]>] PR#4456
  +
     *) If a "Location" field was stored in r->err_headers_out rather
        than r->headers_out, redirect processing wouldn't find it and
        the server would core dump on ap_escape_html(NULL).
  
  
  
  1.440     +13 -7     apache-1.3/src/main/http_main.c
  
  Index: http_main.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/http_main.c,v
  retrieving revision 1.439
  retrieving revision 1.440
  diff -u -r1.439 -r1.440
  --- http_main.c       1999/05/25 11:49:46     1.439
  +++ http_main.c       1999/06/02 06:30:05     1.440
  @@ -333,7 +333,9 @@
   static other_child_rec *other_children;
   #endif
   
  +static pool *pglobal;                /* Global pool */
   static pool *pconf;          /* Pool for config stuff */
  +static pool *plog;           /* Pool for error-logging files */
   static pool *ptrans;         /* Pool for per-transaction stuff */
   static pool *pchild;         /* Pool for httpd child stuff */
   static pool *pcommands;      /* Pool for -C and -c switches */
  @@ -2104,7 +2106,7 @@
   static void clean_parent_exit(int code)
   {
       /* Clear the pool - including any registered cleanups */
  -    ap_destroy_pool(pconf);
  +    ap_destroy_pool(pglobal);
       exit(code);
   }
   
  @@ -3579,7 +3581,9 @@
       AMCSocketInitialize();
   #endif /* WIN32 */
   
  -    pconf = ap_init_alloc();
  +    pglobal = ap_init_alloc();
  +    pconf = ap_make_sub_pool(pglobal);
  +    plog = ap_make_sub_pool(pglobal);
       ptrans = ap_make_sub_pool(pconf);
   
       ap_util_init();
  @@ -4415,7 +4419,8 @@
   
        server_conf = ap_read_config(pconf, ptrans, ap_server_confname);
        setup_listeners(pconf);
  -     ap_open_logs(server_conf, pconf);
  +     ap_clear_pool(plog);
  +     ap_open_logs(server_conf, plog);
        ap_log_pid(pconf, ap_pid_fname);
        ap_set_version();       /* create our server_version string */
        ap_init_modules(pconf, server_conf);
  @@ -4762,7 +4767,7 @@
   
   #ifndef TPF
       if (ap_standalone) {
  -     ap_open_logs(server_conf, pconf);
  +     ap_open_logs(server_conf, plog);
        ap_set_version();
        ap_init_modules(pconf, server_conf);
        version_locked++;
  @@ -4805,7 +4810,7 @@
        /* Yes this is called twice. */
        ap_init_modules(pconf, server_conf);
        version_locked++;
  -     ap_open_logs(server_conf, pconf);
  +     ap_open_logs(server_conf, plog);
        ap_init_modules(pconf, server_conf);
        set_group_privs();
   
  @@ -5855,7 +5860,8 @@
        pparent = ap_make_sub_pool(pconf);
   
        server_conf = ap_read_config(pconf, pparent, ap_server_confname);
  -     ap_open_logs(server_conf, pconf);
  +     ap_clear_pool(plog);
  +     ap_open_logs(server_conf, plog);
        ap_set_version();
        ap_init_modules(pconf, server_conf);
        version_locked++;
  @@ -6093,7 +6099,7 @@
       ap_init_modules(pconf, server_conf);
       ap_suexec_enabled = init_suexec();
       version_locked++;
  -    ap_open_logs(server_conf, pconf);
  +    ap_open_logs(server_conf, plog);
       set_group_privs();
   }
   
  
  
  

Reply via email to