mirror of
https://github.com/ovh/debian-cis.git
synced 2024-11-22 05:27:01 +01:00
FIX(4.1.1.2): fix auditd apply
This commit is contained in:
parent
a6de243808
commit
7b8cca20d6
@ -15,7 +15,7 @@ HARDENING_LEVEL=4
|
|||||||
DESCRIPTION="Disable system on audit log full."
|
DESCRIPTION="Disable system on audit log full."
|
||||||
|
|
||||||
FILE='/etc/audit/auditd.conf'
|
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
|
# This function will be called if the script status is on enabled / audit mode
|
||||||
audit () {
|
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
|
# Source Root Dir Parameter
|
||||||
if [ -r /etc/default/cis-hardening ]; then
|
if [ -r /etc/default/cis-hardening ]; then
|
||||||
. /etc/default/cis-hardening
|
. /etc/default/cis-hardening
|
||||||
|
@ -10,6 +10,8 @@ test_audit() {
|
|||||||
|
|
||||||
describe Correcting situation
|
describe Correcting situation
|
||||||
sed -i 's/audit/enabled/' /opt/debian-cis/etc/conf.d/"${script}".cfg
|
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
|
/opt/debian-cis/bin/hardening/"${script}".sh || true
|
||||||
|
|
||||||
describe Checking resolved state
|
describe Checking resolved state
|
||||||
|
Loading…
Reference in New Issue
Block a user