[Remove entries to the current 2.0 section below, when backported]
+ *) mod_rewrite: Allow piped rewrite logs to be relative to ServerRoot.
+ [André Malo]
+
*) mod_ssl: Fix segfaults after renegotiation failure. PR 21370
[Hartmut Keil <Hartmut.Keil@adnovum.ch>]
{
rewrite_server_conf *conf;
const char *fname;
- apr_status_t rc;
- piped_log *pl;
conf = ap_get_module_config(s->module_config, &rewrite_module);
}
if (*conf->rewritelogfile == '|') {
- if ((pl = ap_open_piped_log(p, conf->rewritelogfile+1)) == NULL) {
+ piped_log *pl;
+
+ fname = ap_server_root_relative(p, conf->rewritelogfile+1);
+ if (!fname) {
+ ap_log_error(APLOG_MARK, APLOG_ERR, APR_EBADPATH, s,
+ "mod_rewrite: Invalid RewriteLog "
+ "path %s", conf->rewritelogfile+1);
+ return 0;
+ }
+
+ if ((pl = ap_open_piped_log(p, fname)) == NULL) {
ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"mod_rewrite: could not open reliable pipe "
- "to RewriteLog filter %s", conf->rewritelogfile+1);
+ "to RewriteLog filter %s", fname);
return 0;
}
conf->rewritelogfp = ap_piped_log_write_fd(pl);
}
else {
+ apr_status_t rc;
+
fname = ap_server_root_relative(p, conf->rewritelogfile);
if (!fname) {
ap_log_error(APLOG_MARK, APLOG_ERR, APR_EBADPATH, s,
"path %s", conf->rewritelogfile);
return 0;
}
+
if ((rc = apr_file_open(&conf->rewritelogfp, fname,
REWRITELOG_FLAGS, REWRITELOG_MODE, p))
!= APR_SUCCESS) {