Skip to content

Commit

Permalink
Merge pull request #12845 from ggbecker/file_ownership_var_log_audit_…
Browse files Browse the repository at this point in the history
…stig-fix

Enable correct OVAL criteria for RHEL9/RHEL10 in file_ownership_var_log_audit_stig
  • Loading branch information
Mab879 authored Jan 17, 2025
2 parents fe4e1df + 3a50bd1 commit 9c82f04
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<extend_definition comment="log_file not set in auditd.conf" definition_ref="auditd_conf_log_file_not_set" negate="true" />
<criterion comment="audit log files are root owned" test_ref="test_user_ownership_audit_log_files" />
</criteria>
{{% if product in ["ol8", "rhel8"] %}}
{{% if "ol" in families or "rhel" in product %}}
<criteria operator="AND" comment="log_file not set">
<extend_definition comment="log_file not set in auditd.conf"
definition_ref="auditd_conf_log_file_not_set"/>
Expand All @@ -28,7 +28,7 @@
<filter action="include">state_owner_not_root_var_log_audit</filter>
</unix:file_object>

{{% if product in ["ol8", "rhel8"] %}}
{{% if "ol" in families or "rhel" in product %}}
<unix:file_test check="all" check_existence="none_exist"
comment="var/log/audit/audit.log file uid root"
id="test_user_ownership_audit_default_log_files" version="1">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# platform = multi_platform_ol,multi_platform_rhel
#!/bin/bash

# packages = audit

sed -i "/^\s*log_file.*/d" /etc/audit/auditd.conf
useradd testuser_123
touch "/var/log/audit/audit2.log"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# platform = multi_platform_ol,multi_platform_rhel
#!/bin/bash

# packages = audit

sed -i "/^\s*log_file.*/d" /etc/audit/auditd.conf
useradd testuser_123
touch "/var/log/audit/audit2.log"
Expand Down

0 comments on commit 9c82f04

Please sign in to comment.