]> granicus.if.org Git - apache/commitdiff
Revert r774755: ap_server_root_relative() for
authorRainer Jung <rjung@apache.org>
Thu, 14 May 2009 19:13:17 +0000 (19:13 +0000)
committerRainer Jung <rjung@apache.org>
Thu, 14 May 2009 19:13:17 +0000 (19:13 +0000)
piped loggers is nonsense. It doesn't work when
the logger path contains whitespace.

We already allow relative paths because we open
the log program via the shell.

Code was taken from mod_rewrite and mod_log_forensic,
which need to be still fixed (removing
ap_server_root_relative() should suffice).

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@774884 13f79535-47bb-0310-9956-ffa450edef68

server/log.c

index e1662aebc1248b51cb497f8f3634f661df109585..c830faf8ba0c2680d96a97c5734be989936c1efa 100644 (file)
@@ -320,24 +320,16 @@ static int open_error_log(server_rec *s, int is_main, apr_pool_t *p)
 
     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, fname, &dummy, is_main);
+        rc = log_child(p, s->error_fname + 1, &dummy, is_main);
         if (rc != APR_SUCCESS) {
             ap_log_error(APLOG_MARK, APLOG_STARTUP, rc, NULL,
                          "Couldn't start ErrorLog process '%s'.",
-                         fname);
+                         s->error_fname + 1);
             return DONE;
         }