mirror of
https://github.com/ovh/debian-cis.git
synced 2024-12-23 14:35:26 +01:00
add --audit-all option
This commit is contained in:
parent
011cd160ea
commit
76811c8a7f
@ -18,6 +18,7 @@ TOTAL_CHECKS=0
|
|||||||
TOTAL_TREATED_CHECKS=0
|
TOTAL_TREATED_CHECKS=0
|
||||||
AUDIT=0
|
AUDIT=0
|
||||||
APPLY=0
|
APPLY=0
|
||||||
|
AUDIT_ALL=0
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
cat << EOF
|
cat << EOF
|
||||||
@ -40,6 +41,9 @@ while [[ $# > 0 ]]; do
|
|||||||
--audit)
|
--audit)
|
||||||
AUDIT=1
|
AUDIT=1
|
||||||
;;
|
;;
|
||||||
|
--audit-all)
|
||||||
|
AUDIT_ALL=1
|
||||||
|
;;
|
||||||
--apply)
|
--apply)
|
||||||
APPLY=1
|
APPLY=1
|
||||||
;;
|
;;
|
||||||
@ -76,6 +80,9 @@ for SCRIPT in $(ls $CIS_ROOT_DIR/bin/hardening/*.sh | sort -V); do
|
|||||||
if [ $AUDIT = 1 ]; then
|
if [ $AUDIT = 1 ]; then
|
||||||
debug "$CIS_ROOT_DIR/bin/hardening/$SCRIPT --audit"
|
debug "$CIS_ROOT_DIR/bin/hardening/$SCRIPT --audit"
|
||||||
$SCRIPT --audit
|
$SCRIPT --audit
|
||||||
|
elif [ $AUDIT_ALL = 1 ]; then
|
||||||
|
debug "$CIS_ROOT_DIR/bin/hardening/$SCRIPT --audit-all"
|
||||||
|
$SCRIPT --audit-all
|
||||||
elif [ $APPLY = 1 ]; then
|
elif [ $APPLY = 1 ]; then
|
||||||
debug "$CIS_ROOT_DIR/bin/hardening/$SCRIPT"
|
debug "$CIS_ROOT_DIR/bin/hardening/$SCRIPT"
|
||||||
$SCRIPT
|
$SCRIPT
|
||||||
|
@ -26,6 +26,10 @@ fi
|
|||||||
while [[ $# > 0 ]]; do
|
while [[ $# > 0 ]]; do
|
||||||
ARG="$1"
|
ARG="$1"
|
||||||
case $ARG in
|
case $ARG in
|
||||||
|
--audit-all)
|
||||||
|
debug "Audit all specified, setting status to audit regardless of configuration"
|
||||||
|
status=audit
|
||||||
|
;;
|
||||||
--audit)
|
--audit)
|
||||||
if [ $status != 'disabled' -a $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"
|
||||||
|
Loading…
Reference in New Issue
Block a user