mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
Replicates CREATEMODE patch to the secondary auditlog file
At patch 45805be, @littlecho changed the behaviour to set the audit log index/serial file permission. Before, it was using the default permission now it is respecting the permission configured via SecAuditLogFileMode. This patch replicates @littlecho's work to the secundary auditlog file.
This commit is contained in:
parent
b175c5cf60
commit
0db247f0e9
@ -1234,9 +1234,12 @@ static const char *cmd_audit_log2(cmd_parms *cmd, void *_dcfg, const char *p1)
|
||||
const char *file_name = ap_server_root_relative(cmd->pool, dcfg->auditlog2_name);
|
||||
apr_status_t rc;
|
||||
|
||||
if (dcfg->auditlog_fileperms == NOT_SET) {
|
||||
dcfg->auditlog_fileperms = CREATEMODE;
|
||||
}
|
||||
rc = apr_file_open(&dcfg->auditlog2_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 secondary audit log file: %s",
|
||||
|
Loading…
x
Reference in New Issue
Block a user