mirror of
https://github.com/usnistgov/macos_security.git
synced 2026-02-03 14:03:24 +00:00
audit_control policy cnt vs ahlt #282
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @robertgendler on GitHub.
audit_failure_halt recommends adding the ahlt to the audit_control policy section which will halt the system if it runs out of space and not able to write the audit logs to disk.
We are not removing cnt which allows things to continuing running even though events are not being audited.
https://www.freebsd.org/cgi/man.cgi?query=audit_control&sektion=5&n=1
We should be checking for cnt and replacing it with ahlt.
@golbiga commented on GitHub:
New Check:
/usr/bin/awk -F':' '/^policy/ {print $NF}' /etc/security/audit_control | /usr/bin/tr ',' '\n' | /usr/bin/grep -Ec 'ahlt'New Fix:
/usr/bin/sed -i.bak 's/^policy.*/policy: ahlt,argv/' /etc/security/audit_control; /usr/sbin/audit -s