mirror of
https://github.com/usnistgov/macos_security.git
synced 2026-02-03 14:03:24 +00:00
fix[rule]: corrected regex for !log_allowed in sed
command now comments the line instead of deleting
This commit is contained in:
@@ -9,7 +9,7 @@ result:
|
||||
fix: |
|
||||
[source,bash]
|
||||
----
|
||||
/usr/bin/find /etc/sudoers* -type f -exec sed -i '' '/Defaults \!log_allowed/d' '{}' \;
|
||||
/usr/bin/find /etc/sudoers* -type f -exec sed -i '' '/^Defaults[[:blank:]]*\!log_allowed/s/^/# /' '{}' \;
|
||||
/bin/echo "Defaults log_allowed" >> /etc/sudoers.d/mscp
|
||||
----
|
||||
references:
|
||||
|
||||
Reference in New Issue
Block a user