httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <rainer.j...@kippdata.de>
Subject Re: svn commit: r774755 - in /httpd/httpd/trunk: CHANGES server/log.c
Date Thu, 14 May 2009 16:27:26 GMT
On 14.05.2009 18:03, William A. Rowe, Jr. wrote:
> rjung@apache.org wrote:
>> 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.
> 
>> --- 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;
>> +        }
> 
> -1 for bug.  This patch presumes "proggy foo bar" is a fspec, it's not,
> it is a command line.
> 
> It results in "|c:/program files/apache/bin/proggy foo bar" if you are
> lucky, but since "bin/proggy foo bar" doesn't really exist, this is all
> free to fail, never mind that c:/... isn't properly quoted.
> 
> Please revert.

The code is identical to what we do in mod_rewrite and mod_log_forensic.
I'll check the details, but I didn't commit this in January without
testing especially with rotatelogs and params.

I'll report my findings.

Rainer

Mime
View raw message