FIX(4.1.1.2): fix auditd apply

This commit is contained in:
Thibault Ayanides 2020-11-09 11:48:48 +01:00
parent a6de243808
commit 7b8cca20d6
2 changed files with 12 additions and 1 deletions

View File

@ -15,7 +15,7 @@ HARDENING_LEVEL=4
DESCRIPTION="Disable system on audit log full."
FILE='/etc/audit/auditd.conf'
OPTIONS='space_left_action=email action_mail_acct=root admin_space_left_action=halt'
OPTIONS=''
# This function will be called if the script status is on enabled / audit mode
audit () {
@ -76,6 +76,15 @@ check_config() {
:
}
create_config() {
cat << EOF
# shellcheck disable=2034
status=audit
# Put here the conf for auditd
OPTIONS='space_left_action=email action_mail_acct=root admin_space_left_action=halt'
EOF
}
# Source Root Dir Parameter
if [ -r /etc/default/cis-hardening ]; then
. /etc/default/cis-hardening

View File

@ -10,6 +10,8 @@ test_audit() {
describe Correcting situation
sed -i 's/audit/enabled/' /opt/debian-cis/etc/conf.d/"${script}".cfg
# to avoid error during auditd installation in 4.1.1.2, only necessary during tests
sed -i "s/OPTIONS='/OPTIONS='space_left=100 admin_space_left=50 /" /opt/debian-cis/etc/conf.d/"${script}".cfg
/opt/debian-cis/bin/hardening/"${script}".sh || true
describe Checking resolved state