mirror of https://github.com/CISOfy/lynis.git
Minor cleanups
This commit is contained in:
parent
b306ab891f
commit
e14376cdab
|
@ -50,7 +50,7 @@
|
|||
Display --indent 2 --text "- Checking automation tooling"
|
||||
|
||||
# Cfengine
|
||||
if [ ! "${CFAGENTBINARY}" = "" ]; then
|
||||
if [ ! -z "${CFAGENTBINARY}" ]; then
|
||||
LogText "Result: CFEngine (cfagent) is installed (${CFAGENTBINARY})"
|
||||
AUTOMATION_TOOL_FOUND=1
|
||||
CFENGINE_AGENT_FOUND=1
|
||||
|
@ -126,14 +126,14 @@
|
|||
fi
|
||||
|
||||
# SaltStack
|
||||
if [ ! "${SALTMINIONBINARY}" = "" ]; then
|
||||
if [ ! -z "${SALTMINIONBINARY}" ]; then
|
||||
LogText "Result: SaltStack (salt-minion) is installed (${SALTMINIONBINARY})"
|
||||
AUTOMATION_TOOL_FOUND=1
|
||||
SALT_MINION_RUNNING=1
|
||||
Report "automation_tool_running[]=saltstack-minion"
|
||||
Display --indent 4 --text "Found: SaltStack minion (salt-minion)" --result "${STATUS_FOUND}" --color GREEN
|
||||
fi
|
||||
if [ ! "${SALTMASTERBINARY}" = "" ]; then
|
||||
if [ ! -z "${SALTMASTERBINARY}" ]; then
|
||||
LogText "Result: SaltStack (salt-master) is installed (${SALTMASTERBINARY})"
|
||||
AUTOMATION_TOOL_FOUND=1
|
||||
SALT_MASTER_RUNNING=1
|
||||
|
@ -170,7 +170,7 @@
|
|||
if [ ${SKIPTEST} -eq 0 ]; then
|
||||
|
||||
# Fail2ban presence
|
||||
if [ ! "${FAIL2BANBINARY}" = "" ]; then
|
||||
if [ ! -z "${FAIL2BANBINARY}" ]; then
|
||||
FAIL2BAN_FOUND=1
|
||||
IDS_IPS_TOOL_FOUND=1
|
||||
LogText "Result: Fail2ban is installed (${FAIL2BANBINARY})"
|
||||
|
@ -191,7 +191,7 @@
|
|||
fi
|
||||
|
||||
# Continue if tooling is available and configuration file found
|
||||
if [ ${FAIL2BAN_FOUND} -eq 1 -a ! "${FAIL2BAN_CONFIG}" = "" ]; then
|
||||
if [ ${FAIL2BAN_FOUND} -eq 1 -a ! -z "${FAIL2BAN_CONFIG}" ]; then
|
||||
Report "fail2ban_config=${FAIL2BAN_CONFIG}"
|
||||
FAIL2BANCLIENT=$(which fail2ban-client 2> /dev/null | grep -v "no [^ ]* in ")
|
||||
if [ ! -z "${FAIL2BANCLIENT}" ]; then PERFORM_FAIL2BAN_TESTS=1; fi
|
||||
|
@ -206,7 +206,7 @@
|
|||
Register --test-no TOOL-5104 --weight L --network NO --preqs-met ${PREQS_MET} --category security --description "Enabled tests in Fail2ban"
|
||||
if [ ${SKIPTEST} -eq 0 ]; then
|
||||
FIND=$(${FAIL2BANCLIENT} -d | ${TRBINARY} -d '[]' | ${TRBINARY} -d "'" | ${AWKBINARY} -F, '{ if ($1=="add") { print $2 }}' | ${TRBINARY} -d ' ')
|
||||
if [ ! "${FIND}" = "" ]; then
|
||||
if [ ! -z "${FIND}" ]; then
|
||||
for F2BSERVICE in ${FIND}; do
|
||||
LogText "Result: service '${F2BSERVICE}' enabled"
|
||||
Report "fail2ban_enabled_service[]=${F2BSERVICE}"
|
||||
|
@ -234,12 +234,12 @@
|
|||
# FIND=$(${EGREPBINARY} "^action = \%\(action_m.*\)s" ${FAIL2BAN_CONFIG})
|
||||
# FIND2=$(${EGREPBINARY} "^action = \%\(action_\)s" ${FAIL2BAN_CONFIG})
|
||||
#
|
||||
# if [ ! "${FIND}" = "" ]; then
|
||||
# if [ ! -z "${FIND}" ]; then
|
||||
# FAIL2BAN_EMAIL=1
|
||||
# LogText "Result: found at least one jail which sends an email alert"
|
||||
# fi
|
||||
#
|
||||
# if [ ! "${FIND2}" = "" ]; then
|
||||
# if [ ! -z "${FIND2}" ]; then
|
||||
# FAIL2BAN_SILENT=1
|
||||
# LogText "Result: found at least one jail which does NOT send an email alert"
|
||||
# fi
|
||||
|
|
Loading…
Reference in New Issue