Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb175c5c

Browse files
littlechoFelipe Zimmerle
authored and
Felipe Zimmerle
committed
Update apache2_config.c
Change third parameter(which is the apr file permission flag) from CREATEMODE to dcfg->auditlog_fileperms. Due to the user can specify the desired file permission setting for the audit log files with setting the value of SecAuditLogFileMode, we should follow the file permission setting from the config file. Therefore, as the dcfg->auditlog_fileperms will be modified in cmd_audit_log_dirmode function, we can use the value while calling apr_file_open to meet the file permission that specified in modsecurity.conf.
1 parent35fbc76 commitb175c5c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎apache2/apache2_config.c‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,10 +1192,13 @@ static const char *cmd_audit_log(cmd_parms *cmd, void *_dcfg, const char *p1)
11921192
else {
11931193
constchar*file_name=ap_server_root_relative(cmd->pool,dcfg->auditlog_name);
11941194
apr_status_trc;
1195-
1195+
1196+
if (dcfg->auditlog_fileperms==NOT_SET) {
1197+
dcfg->auditlog_fileperms=CREATEMODE;
1198+
}
11961199
rc=apr_file_open(&dcfg->auditlog_fd,file_name,
11971200
APR_WRITE |APR_APPEND |APR_CREATE |APR_BINARY,
1198-
CREATEMODE,cmd->pool);
1201+
dcfg->auditlog_fileperms,cmd->pool);
11991202

12001203
if (rc!=APR_SUCCESS) {
12011204
returnapr_psprintf(cmd->pool,"ModSecurity: Failed to open the audit log file: %s",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp