httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r774755 - in /httpd/httpd/trunk: CHANGES server/log.c
Date Thu, 14 May 2009 12:59:26 GMT
Author: rjung
Date: Thu May 14 12:59:25 2009
New Revision: 774755

URL: http://svn.apache.org/viewvc?rev=774755&view=rev
Log:
Allow relative pathnames for piped loggers in ErrorLog.

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/server/log.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=774755&r1=774754&r2=774755&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Thu May 14 12:59:25 2009
@@ -6,6 +6,9 @@
      mod_proxy_ajp: Avoid delivering content from a previous request which
      failed to send a request body. PR 46949 [Ruediger Pluem]
 
+  *) core: Allow relative pathnames for piped loggers in ErrorLog.
+     [Rainer Jung]
+
   *) Windows: Fix usage message.
      [Rainer Jung]
 

Modified: httpd/httpd/trunk/server/log.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/log.c?rev=774755&r1=774754&r2=774755&view=diff
==============================================================================
--- httpd/httpd/trunk/server/log.c (original)
+++ httpd/httpd/trunk/server/log.c Thu May 14 12:59:25 2009
@@ -320,16 +320,24 @@
 
     if (*s->error_fname == '|') {
         apr_file_t *dummy = NULL;
+        fname = ap_server_root_relative(p, s->error_fname + 1);
+
+        if (!fname) {
+            ap_log_error(APLOG_MARK, APLOG_STARTUP, APR_EBADPATH, NULL,
+                         "%s: Invalid error log path %s.",
+                         ap_server_argv0, s->error_fname);
+            return DONE;
+        }
 
         /* Spawn a new child logger.  If this is the main server_rec,
          * the new child must use a dummy stderr since the current
          * stderr might be a pipe to the old logger.  Otherwise, the
          * child inherits the parents stderr. */
-        rc = log_child(p, s->error_fname + 1, &dummy, is_main);
+        rc = log_child(p, fname, &dummy, is_main);
         if (rc != APR_SUCCESS) {
             ap_log_error(APLOG_MARK, APLOG_STARTUP, rc, NULL,
                          "Couldn't start ErrorLog process '%s'.",
-                         s->error_fname + 1);
+                         fname);
             return DONE;
         }
 



Mime
View raw message