mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-22 21:34:38 +02:00
Style improvement and extended log messages
This commit is contained in:
parent
2942b4196b
commit
2eb6d908e1
@ -75,12 +75,14 @@
|
|||||||
if [ ${SKIPTEST} -eq 0 ]; then
|
if [ ${SKIPTEST} -eq 0 ]; then
|
||||||
# Check if any service is enabled in /etc/inetd.conf (inetd is not active, see test 8002)
|
# Check if any service is enabled in /etc/inetd.conf (inetd is not active, see test 8002)
|
||||||
LogText "Test: check if all services are disabled if inetd is disabled"
|
LogText "Test: check if all services are disabled if inetd is disabled"
|
||||||
FIND=`${GREPBINARY} -v "^#" ${INETD_CONFIG_FILE} | ${GREPBINARY} -v "^$"`
|
FIND=$(${GREPBINARY} -v "^#" ${INETD_CONFIG_FILE} | ${GREPBINARY} -v "^$")
|
||||||
if [ "${FIND}" = "" ]; then
|
if [ -z "${FIND}" ]; then
|
||||||
|
LogText "Result: no services found in ${INETD_CONFIG_FILE}"
|
||||||
Display --indent 4 --text "- Checking inetd.conf services" --result "${STATUS_OK}" --color GREEN
|
Display --indent 4 --text "- Checking inetd.conf services" --result "${STATUS_OK}" --color GREEN
|
||||||
else
|
else
|
||||||
|
LogText "Result: found services in inetd, even though inetd is not running"
|
||||||
Display --indent 4 --text "- Checking inetd.conf services" --result "${STATUS_SUGGESTION}" --color YELLOW
|
Display --indent 4 --text "- Checking inetd.conf services" --result "${STATUS_SUGGESTION}" --color YELLOW
|
||||||
ReportSuggestion ${TEST_NO} "Although inetd is not running, make sure no services are enabled in ${INETD_CONFIG_FILE}"
|
ReportSuggestion ${TEST_NO} "Although inetd is not running, make sure no services are enabled in ${INETD_CONFIG_FILE}, or remove inetd service"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
@ -92,7 +94,7 @@
|
|||||||
Register --test-no INSE-8016 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Check for telnet via inetd"
|
Register --test-no INSE-8016 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Check for telnet via inetd"
|
||||||
if [ ${SKIPTEST} -eq 0 ]; then
|
if [ ${SKIPTEST} -eq 0 ]; then
|
||||||
LogText "Test: checking telnet presence in inetd configuration"
|
LogText "Test: checking telnet presence in inetd configuration"
|
||||||
FIND=`${GREPBINARY} "^telnet" ${INETD_CONFIG_FILE}`
|
FIND=$(${GREPBINARY} "^telnet" ${INETD_CONFIG_FILE})
|
||||||
if [ "${FIND}" = "" ]; then
|
if [ "${FIND}" = "" ]; then
|
||||||
LogText "Result: telnet not enabled in ${INETD_CONFIG_FILE}"
|
LogText "Result: telnet not enabled in ${INETD_CONFIG_FILE}"
|
||||||
Display --indent 2 --text "- Checking inetd (telnet)" --result "${STATUS_NOT_FOUND}" --color GREEN
|
Display --indent 2 --text "- Checking inetd (telnet)" --result "${STATUS_NOT_FOUND}" --color GREEN
|
||||||
|
Loading…
x
Reference in New Issue
Block a user