mirror of https://github.com/CISOfy/lynis.git
Use the new status strings in tests
See-Also: HEAD^ Signed-off-by: Simon Biewald <simon@fam-biewald.de>
This commit is contained in:
parent
7ec3b5b0d5
commit
0c686bb6ea
|
@ -502,7 +502,7 @@
|
|||
FIND=$(${EGREPBINARY} "^passwd" /etc/nsswitch.conf | ${EGREPBINARY} "compat|nisplus")
|
||||
if [ -z "${FIND}" ]; then
|
||||
LogText "Result: NIS+ authentication not enabled"
|
||||
Display --indent 2 --text "- NIS+ authentication support" --result "NOT ENABLED" --color WHITE
|
||||
Display --indent 2 --text "- NIS+ authentication support" --result "${STATUS_NOT_ENABLED}" --color WHITE
|
||||
else
|
||||
FIND2=$(${EGREPBINARY} "^passwd_compat" ${ROOTDIR}etc/nsswitch.conf | ${GREPBINARY} "nisplus")
|
||||
FIND3=$(${EGREPBINARY} "^passwd" ${ROOTDIR}etc/nsswitch.conf | ${GREPBINARY} "nisplus")
|
||||
|
@ -511,7 +511,7 @@
|
|||
Display --indent 2 --text "- NIS+ authentication support" --result "${STATUS_ENABLED}" --color GREEN
|
||||
else
|
||||
LogText "Result: NIS+ authentication not enabled"
|
||||
Display --indent 2 --text "- NIS+ authentication support" --result "NOT ENABLED" --color WHITE
|
||||
Display --indent 2 --text "- NIS+ authentication support" --result "${STATUS_NOT_ENABLED}" --color WHITE
|
||||
fi
|
||||
fi
|
||||
else
|
||||
|
@ -529,7 +529,7 @@
|
|||
FIND=$(${EGREPBINARY} "^passwd" /etc/nsswitch.conf | ${EGREPBINARY} "compat|nis" | ${GREPBINARY} -v "nisplus")
|
||||
if [ -z "${FIND}" ]; then
|
||||
LogText "Result: NIS authentication not enabled"
|
||||
Display --indent 2 --text "- NIS authentication support" --result "NOT ENABLED" --color WHITE
|
||||
Display --indent 2 --text "- NIS authentication support" --result "${STATUS_NOT_ENABLED}" --color WHITE
|
||||
else
|
||||
FIND2=$(${EGREPBINARY} "^passwd_compat" /etc/nsswitch.conf | ${GREPBINARY} "nis" | ${GREPBINARY} -v "nisplus")
|
||||
FIND3=$(${EGREPBINARY} "^passwd" /etc/nsswitch.conf | ${GREPBINARY} "nis" | ${GREPBINARY} -v "nisplus")
|
||||
|
@ -538,7 +538,7 @@
|
|||
Display --indent 2 --text "- NIS authentication support" --result "${STATUS_ENABLED}" --color GREEN
|
||||
else
|
||||
LogText "Result: NIS authentication not enabled"
|
||||
Display --indent 2 --text "- NIS authentication support" --result "NOT ENABLED" --color WHITE
|
||||
Display --indent 2 --text "- NIS authentication support" --result "${STATUS_NOT_ENABLED}" --color WHITE
|
||||
fi
|
||||
fi
|
||||
else
|
||||
|
@ -1475,7 +1475,7 @@
|
|||
if [ ${FOUND} -eq 1 ]; then
|
||||
Display --indent 2 --text "- Checking account locking" --result "${STATUS_ENABLED}" --color GREEN
|
||||
else
|
||||
Display --indent 2 --text "- Checking account locking" --result "NOT ENABLED" --color YELLOW
|
||||
Display --indent 2 --text "- Checking account locking" --result "${STATUS_NOT_ENABLED}" --color YELLOW
|
||||
fi
|
||||
fi
|
||||
#
|
||||
|
@ -1489,7 +1489,7 @@
|
|||
FIND=$(${EGREPBINARY} "^passwd" ${ROOTDIR}etc/nsswitch.conf | ${GREPBINARY} "ldap")
|
||||
if [ "${FIND}" = "" ]; then
|
||||
LogText "Result: LDAP authentication not enabled"
|
||||
Display --indent 2 --text "- LDAP authentication support" --result "NOT ENABLED" --color WHITE
|
||||
Display --indent 2 --text "- LDAP authentication support" --result "${STATUS_NOT_ENABLED}" --color WHITE
|
||||
else
|
||||
LogText "Result: LDAP authentication enabled"
|
||||
Display --indent 2 --text "- LDAP authentication support" --result "${STATUS_ENABLED}" --color GREEN
|
||||
|
|
|
@ -539,7 +539,7 @@
|
|||
Register --test-no FIRE-4590 --weight L --network NO --category security --description "Check firewall status"
|
||||
if [ ${SKIPTEST} -eq 0 ]; then
|
||||
if [ ${FIREWALL_ACTIVE} -eq 1 ]; then
|
||||
Display --indent 2 --text "- Checking host based firewall" --result "ACTIVE" --color GREEN
|
||||
Display --indent 2 --text "- Checking host based firewall" --result "${STATUS_ACTIVE}" --color GREEN
|
||||
LogText "Result: host based firewall or packet filter is active"
|
||||
Report "manual[]=Verify if there is a formal process for testing and applying firewall rules"
|
||||
Report "manual[]=Verify all traffic is filtered the right way between the different security zones"
|
||||
|
@ -548,7 +548,7 @@
|
|||
Report "manual[]=Make sure an explicit deny all is the default policy for all unmatched traffic"
|
||||
AddHP 5 5
|
||||
else
|
||||
Display --indent 2 --text "- Checking host based firewall" --result "NOT ACTIVE" --color YELLOW
|
||||
Display --indent 2 --text "- Checking host based firewall" --result "${STATUS_NOT_ACTIVE}" --color YELLOW
|
||||
LogText "Result: no host based firewall/packet filter found or configured"
|
||||
ReportSuggestion "${TEST_NO}" "Configure a firewall/packet filter to filter incoming and outgoing traffic"
|
||||
AddHP 0 5
|
||||
|
|
|
@ -63,11 +63,11 @@
|
|||
LogText "Test: Searching for active inet daemon"
|
||||
if IsRunning "inetd"; then
|
||||
LogText "Result: inetd is running"
|
||||
Display --indent 4 --text "- inetd status" --result "ACTIVE" --color GREEN
|
||||
Display --indent 4 --text "- inetd status" --result "${STATUS_ACTIVE}" --color GREEN
|
||||
INETD_ACTIVE=1
|
||||
else
|
||||
LogText "Result: inetd is NOT running"
|
||||
Display --indent 4 --text "- inetd status" --result "NOT ACTIVE" --color GREEN
|
||||
Display --indent 4 --text "- inetd status" --result "${STATUS_NOT_ACTIVE}" --color GREEN
|
||||
fi
|
||||
fi
|
||||
#
|
||||
|
@ -158,11 +158,11 @@
|
|||
LogText "Test: Searching for active extended internet services daemon (xinetd)"
|
||||
if IsRunning "xinetd"; then
|
||||
LogText "Result: xinetd is running"
|
||||
Display --indent 4 --text "- xinetd status" --result "ACTIVE" --color GREEN
|
||||
Display --indent 4 --text "- xinetd status" --result "${STATUS_ACTIVE}" --color GREEN
|
||||
XINETD_ACTIVE=1
|
||||
else
|
||||
LogText "Result: xinetd is NOT running"
|
||||
Display --indent 4 --text "- xinetd status" --result "NOT ACTIVE" --color GREEN
|
||||
Display --indent 4 --text "- xinetd status" --result "${STATUS_NOT_ACTIVE}" --color GREEN
|
||||
fi
|
||||
fi
|
||||
#
|
||||
|
|
|
@ -683,7 +683,7 @@
|
|||
Display --indent 2 --text "- Checking status DHCP client" --result "${STATUS_RUNNING}" --color WHITE
|
||||
DHCP_CLIENT_RUNNING=1
|
||||
else
|
||||
Display --indent 2 --text "- Checking status DHCP client" --result "NOT ACTIVE" --color WHITE
|
||||
Display --indent 2 --text "- Checking status DHCP client" --result "${STATUS_NOT_ACTIVE}" --color WHITE
|
||||
fi
|
||||
fi
|
||||
#
|
||||
|
|
|
@ -1232,7 +1232,7 @@
|
|||
ReportSuggestion "${TEST_NO}" "Install a package audit tool to determine vulnerable packages"
|
||||
LogText "Result: no package audit tool found"
|
||||
else
|
||||
Display --indent 2 --text "- Checking package audit tool" --result INSTALLED --color GREEN
|
||||
Display --indent 2 --text "- Checking package audit tool" --result "${STATUS_INSTALLED}" --color GREEN
|
||||
Display --indent 4 --text "Found: ${PACKAGE_AUDIT_TOOL}"
|
||||
LogText "Result: found package audit tool: ${PACKAGE_AUDIT_TOOL}"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue