Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions apache2/apache2_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -1189,10 +1189,13 @@ static const char *cmd_audit_log(cmd_parms *cmd, void *_dcfg, const char *p1)
else {
const char *file_name = ap_server_root_relative(cmd->pool, dcfg->auditlog_name);
apr_status_t rc;


if (dcfg->auditlog_fileperms == NOT_SET) {
dcfg->auditlog_fileperms = CREATEMODE;
}
rc = apr_file_open(&dcfg->auditlog_fd, file_name,
APR_WRITE | APR_APPEND | APR_CREATE | APR_BINARY,
CREATEMODE, cmd->pool);
dcfg->auditlog_fileperms, cmd->pool);

if (rc != APR_SUCCESS) {
return apr_psprintf(cmd->pool, "ModSecurity: Failed to open the audit log file: %s",
Expand Down
2 changes: 1 addition & 1 deletion apache2/mod_security2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1278,7 +1278,7 @@ static int hook_log_transaction(request_rec *r) {

msr->r = r;
msr->response_status = r->status;
msr->status_line = ((r->status_line != NULL)
msr->status_line = ((r->status_line != NULL) && (*r->status_line != '\0')
? r->status_line : ap_get_status_line(r->status));
msr->response_protocol = get_response_protocol(origr);
msr->response_headers = apr_table_copy(msr->mp, r->headers_out);
Expand Down
Loading