15648359 SUNBT6959303 Cannot start Solaris Apache 2 and 2.2 via httpd -f
authorPetr Sumbera <petr.sumbera@oracle.com>
Thu, 06 Jun 2013 01:58:08 -0700
changeset 1329 1fa926a64bc6
parent 1328 5aa75d7e4b1f
child 1330 2a50bc2a23b0
15648359 SUNBT6959303 Cannot start Solaris Apache 2 and 2.2 via httpd -f
components/apache2/patches/apachectl.patch
components/apache2/patches/bug54719.patch
--- a/components/apache2/patches/apachectl.patch	Thu Jun 06 01:58:08 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
---- support/apachectl.in.orig	Tue Jul 11 20:38:44 2006
-+++ support/apachectl.in	Tue Feb 12 02:24:17 2008
[email protected]@ -75,6 +75,12 @@
-     ARGV="-h"
- fi
- 
-+if [ ! -d "@[email protected]" ]; then
-+    mkdir -p @[email protected]
-+    chown -R webservd @[email protected]
-+    chgrp -R webservd @[email protected]
-+fi
-+
- case $ARGV in
- start|stop|restart|graceful|graceful-stop)
-     $HTTPD -k $ARGV
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/apache2/patches/bug54719.patch	Thu Jun 06 01:58:08 2013 -0700
@@ -0,0 +1,29 @@
+https://issues.apache.org/bugzilla/show_bug.cgi?id=54719
+
+--- server/log.c	2009-05-21 10:31:52.000000000 -0700
++++ server/log.c	2013-04-03 02:34:41.324804956 -0700
[email protected]@ -775,7 +775,7 @@ AP_DECLARE(void) ap_log_pid(apr_pool_t *
+     static pid_t saved_pid = -1;
+     pid_t mypid;
+     apr_status_t rv;
+-    const char *fname;
++    const char *fname, *dname;
+ 
+     if (!filename) {
+         return;
[email protected]@ -804,6 +804,15 @@ AP_DECLARE(void) ap_log_pid(apr_pool_t *
+                       fname);
+     }
+ 
++    dname = apr_pstrndup(p, filename, (strrchr(filename, '/')+1)-filename);
++    if (APR_SUCCESS != (rv = apr_dir_make_recursive(dname,
++            APR_OS_DEFAULT, p))) {
++        ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL,
++                     "could not create pid directory: %s",
++                     dname);
++        exit(1);
++    }
++
+     if ((rv = apr_file_open(&pid_file, fname,
+                             APR_WRITE | APR_CREATE | APR_TRUNCATE,
+                             APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD, p))