mirror of
https://github.com/ovh/debian-cis.git
synced 2024-11-24 14:31:24 +01:00
Fixed disabled features, headers and preparing main script
This commit is contained in:
parent
fa98efc32b
commit
628fe96666
@ -14,3 +14,9 @@
|
|||||||
# Audit mode
|
# Audit mode
|
||||||
|
|
||||||
# ls | sort -V
|
# ls | sort -V
|
||||||
|
|
||||||
|
cd /opt/cis-hardening/bin/hardening
|
||||||
|
for i in $(ls | sort -V); do
|
||||||
|
echo "$i"
|
||||||
|
./$i --audit
|
||||||
|
done
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
#
|
#
|
||||||
# 13.18 Check for Presence of User .netrc Files (Scored)
|
# 13.19 Check for Presence of User .forward Files (Scored)
|
||||||
#
|
#
|
||||||
|
|
||||||
set -e # One error, it's over
|
set -e # One error, it's over
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
#
|
#
|
||||||
# 13.18 Check for Presence of User .netrc Files (Scored)
|
# 13.20 Ensure shadow group is empty (Scored)
|
||||||
#
|
#
|
||||||
|
|
||||||
set -e # One error, it's over
|
set -e # One error, it's over
|
||||||
|
2
etc/conf.d/7.5.3_disable_rds.cfg
Normal file
2
etc/conf.d/7.5.3_disable_rds.cfg
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Configuration for script of same name
|
||||||
|
status=enabled
|
@ -27,7 +27,7 @@ while [[ $# > 0 ]]; do
|
|||||||
ARG="$1"
|
ARG="$1"
|
||||||
case $ARG in
|
case $ARG in
|
||||||
--audit)
|
--audit)
|
||||||
if [ $status != 'disabled' -o $status != 'false' ]; then
|
if [ $status != 'disabled' -a $status != 'false' ]; then
|
||||||
debug "Audit argument detected, setting status to audit"
|
debug "Audit argument detected, setting status to audit"
|
||||||
status=audit
|
status=audit
|
||||||
else
|
else
|
||||||
@ -58,17 +58,17 @@ case $status in
|
|||||||
;;
|
;;
|
||||||
disabled | false )
|
disabled | false )
|
||||||
info "$SCRIPT_NAME is disabled, ignoring"
|
info "$SCRIPT_NAME is disabled, ignoring"
|
||||||
|
exit 2 # Means unknown status
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
warn "Wrong value for status : $status. Must be [ enabled | true | audit | disabled | false ]"
|
warn "Wrong value for status : $status. Must be [ enabled | true | audit | disabled | false ]"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
info "Results : "
|
|
||||||
if [ $CRITICAL_ERRORS_NUMBER = 0 ]; then
|
if [ $CRITICAL_ERRORS_NUMBER = 0 ]; then
|
||||||
ok "Check Passed"
|
ok "Check Passed"
|
||||||
exit 0
|
exit 0 # Means ok status
|
||||||
else
|
else
|
||||||
crit "Check Failed"
|
crit "Check Failed"
|
||||||
exit 1
|
exit 1 # Means critical status
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user