Skip to content

Commit 69115f7

Browse files
authored
Merge pull request #1366 from stackhpc/bugfix/cis-log-perms
CIS: Stop recursively setting permissions on logs files
2 parents e8c03a2 + bc050c1 commit 69115f7

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

etc/kayobe/inventory/group_vars/cis-hardening/cis

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ rhel9cis_rule_6_1_15: false
5151
# filesystem. We do not want to change /var/lib/docker permissions.
5252
rhel9cis_no_world_write_adjust: false
5353

54+
# Prevent hardening from recursivley changing permissions on log files
55+
rhel9cis_rule_4_2_3: false
56+
5457
# Configure log rotation to prevent audit logs from filling the disk
5558
rhel9cis_auditd:
5659
space_left_action: syslog
@@ -153,6 +156,9 @@ ubtu22cis_no_owner_adjust: false
153156
ubtu22cis_no_world_write_adjust: false
154157
ubtu22cis_suid_adjust: false
155158

159+
# Prevent hardening from recursivley changing permissions on log files
160+
ubtu22cis_rule_4_2_3: false
161+
156162
# Configure log rotation to prevent audit logs from filling the disk
157163
ubtu22cis_auditd:
158164
action_mail_acct: root
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
fixes:
3+
- |
4+
The CIS hardening scripts no longer change permissions of log files by
5+
default. It is preferred to configure these permissions at source i.e on
6+
whatever is creating the files. It also suffered from a time-of-check to
7+
time-of-use race condition. If you want the old behaviour you can change
8+
``rhel9cis_rule_4_2_3`` and/or ``ubtu22cis_rule_4_2_3`` to ``true``.

0 commit comments

Comments
 (0)