mirror of
https://github.com/usnistgov/macos_security.git
synced 2026-02-03 14:03:24 +00:00
Prevent fixes when not needed #280
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.
In rules that edit text files, adding
/usr/bin/grep -qE "(regular expression from the check) file/to/change || (current fix)It will prevent the fix from occurring if not needed
for audit_flags_ad_configure for example
/usr/bin/grep -qE "^flags.*[^-]ad" /etc/security/audit_control || /usr/bin/sed -i.bak '/^flags/ s/$/,ad/' /etc/security/audit_control; /usr/sbin/audit -s@golbiga commented on GitHub:
This has been addressed in
main,big_sur, andcatalina.