httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grega...@apache.org
Subject cvs commit: httpd-2.0/server mpm_common.c
Date Thu, 15 May 2003 20:28:18 GMT
gregames    2003/05/15 13:28:18

  Modified:    .        Tag: APACHE_2_0_BRANCH CHANGES STATUS configure.in
               include  Tag: APACHE_2_0_BRANCH mpm_common.h
               os/unix  Tag: APACHE_2_0_BRANCH unixd.c
               server   Tag: APACHE_2_0_BRANCH mpm_common.c
  Log:
  backport the following change from 2.1:
      Enable coredumps on Linux 2.4+ if CoreDumpDirectory is coded
  
  I tried to clarify the doc, but it still looks like geek-speak.  Any ideas
  on how to better explain this to users would be appreciated.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.988.2.99 +4 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.988.2.98
  retrieving revision 1.988.2.99
  diff -u -r1.988.2.98 -r1.988.2.99
  --- CHANGES	15 May 2003 00:50:43 -0000	1.988.2.98
  +++ CHANGES	15 May 2003 20:28:16 -0000	1.988.2.99
  @@ -1,5 +1,9 @@
   Changes with Apache 2.0.46
   
  +  *) Linux 2.4+: If Apache is started as root and you code 
  +     CoreDumpDirectory, coredumps are enabled via the prctl() syscall.
  +     [Greg Ames]
  +
     *) ap_get_mime_headers_core: allocate space for the trailing null
        when folding is in effect.
        PR 18170 [Peter Mayne <PeterMayne@SPAM_SUX.ap.spherion.com>]
  
  
  
  1.751.2.281 +1 -14     httpd-2.0/STATUS
  
  Index: STATUS
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/STATUS,v
  retrieving revision 1.751.2.280
  retrieving revision 1.751.2.281
  diff -u -r1.751.2.280 -r1.751.2.281
  --- STATUS	15 May 2003 18:08:38 -0000	1.751.2.280
  +++ STATUS	15 May 2003 20:28:16 -0000	1.751.2.281
  @@ -187,19 +187,6 @@
                  (above) will look at this independently
         DELETE ME when the SSLC 2.3 compatibility entry above is removed
   
  -    * Enable coredumps on Linux 2.4+ if CoreDumpDirectory is coded
  -      os/unix/unixd.c                 r1.57
  -      configure.in                    r1.245   
  -      docs/manual/mod/mpm_common.xml  r1.23
  -      include/mpm_common.h            r1.41
  -      server/mpm_common.c             r1.104
  -      +1: gregames, trawick, jim, nd
  -      (trawick volunteers to regenerate/commit/site-update the html
  -      corresponding to mpm_common.xml if that isn't something you're
  -      comfortable with doing)
  -      (the docs should explain the thing better. Currently it's not
  -       really understandable for users. If nobody else does, nd tries to.)
  -
       * Ensure that ssl-std.conf is generated at configure time, and switch
         to using the expanded config variables to work the same as 
         httpd-std.conf PR: 19611
  
  
  
  1.232.2.8 +2 -0      httpd-2.0/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/configure.in,v
  retrieving revision 1.232.2.7
  retrieving revision 1.232.2.8
  diff -u -r1.232.2.7 -r1.232.2.8
  --- configure.in	13 May 2003 16:30:01 -0000	1.232.2.7
  +++ configure.in	15 May 2003 20:28:17 -0000	1.232.2.8
  @@ -275,6 +275,7 @@
   pwd.h \
   grp.h \
   strings.h \
  +sys/prctl.h \
   sys/processor.h \
   sys/sem.h
   )
  @@ -296,6 +297,7 @@
   getgrnam \
   initgroups \
   bindprocessor \
  +prctl \
   timegm \
   )
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.39.2.4  +1 -0      httpd-2.0/include/mpm_common.h
  
  Index: mpm_common.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/include/mpm_common.h,v
  retrieving revision 1.39.2.3
  retrieving revision 1.39.2.4
  diff -u -r1.39.2.3 -r1.39.2.4
  --- mpm_common.h	17 Apr 2003 20:26:33 -0000	1.39.2.3
  +++ mpm_common.h	15 May 2003 20:28:18 -0000	1.39.2.4
  @@ -276,6 +276,7 @@
    */
   #ifdef AP_MPM_WANT_SET_COREDUMPDIR
   extern char ap_coredump_dir[MAX_STRING_LEN];
  +extern int ap_coredumpdir_configured;
   const char *ap_mpm_set_coredumpdir(cmd_parms *cmd, void *dummy,
                                      const char *arg);
   #endif
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.55.2.2  +15 -0     httpd-2.0/os/unix/unixd.c
  
  Index: unixd.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/os/unix/unixd.c,v
  retrieving revision 1.55.2.1
  retrieving revision 1.55.2.2
  diff -u -r1.55.2.1 -r1.55.2.2
  --- unixd.c	3 Feb 2003 17:31:58 -0000	1.55.2.1
  +++ unixd.c	15 May 2003 20:28:18 -0000	1.55.2.2
  @@ -89,6 +89,9 @@
   #ifdef HAVE_SYS_SEM_H
   #include <sys/sem.h>
   #endif
  +#ifdef HAVE_SYS_PRCTL_H
  +#include <sys/prctl.h>
  +#endif
   
   unixd_config_rec unixd_config;
   
  @@ -181,6 +184,18 @@
                       (long) unixd_config.user_id);
   	return -1;
       }
  +#if defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE) 
  +    /* this applies to Linux 2.4+ */
  +#ifdef AP_MPM_WANT_SET_COREDUMPDIR
  +    if (ap_coredumpdir_configured) {
  +        if (prctl(PR_SET_DUMPABLE, 1)) {
  +            ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL,
  +                         "set dumpable failed - this child will not coredump"
  +                         " after software errors");
  +        }
  +    }
  +#endif
  +#endif
   #endif
       return 0;
   }
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.102.2.4 +2 -0      httpd-2.0/server/mpm_common.c
  
  Index: mpm_common.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm_common.c,v
  retrieving revision 1.102.2.3
  retrieving revision 1.102.2.4
  diff -u -r1.102.2.3 -r1.102.2.4
  --- mpm_common.c	17 Apr 2003 20:26:33 -0000	1.102.2.3
  +++ mpm_common.c	15 May 2003 20:28:18 -0000	1.102.2.4
  @@ -634,6 +634,7 @@
   
   #ifdef AP_MPM_WANT_SET_COREDUMPDIR
   char ap_coredump_dir[MAX_STRING_LEN];
  +int ap_coredumpdir_configured;
   
   const char *ap_mpm_set_coredumpdir(cmd_parms *cmd, void *dummy,
                                      const char *arg)
  @@ -660,6 +661,7 @@
                              " is not a directory", NULL);
       }
       apr_cpystrn(ap_coredump_dir, fname, sizeof(ap_coredump_dir));
  +    ap_coredumpdir_configured = 1;
       return NULL;
   }
   #endif
  
  
  

Mime
View raw message