mirror of https://github.com/CISOfy/lynis.git
[CUPS-2308] removed exception handler, improved logging
This commit is contained in:
parent
72aed70677
commit
90e240cfb5
|
@ -146,21 +146,20 @@
|
||||||
N=$((N + 1))
|
N=$((N + 1))
|
||||||
FOUND=1
|
FOUND=1
|
||||||
done
|
done
|
||||||
if [ ${FOUND} -eq 0 ]; then
|
|
||||||
ReportException "${TEST_NO}:1" "No listen statement found in CUPS configuration file"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check if daemon is only running on localhost
|
# Check if daemon is only running on localhost
|
||||||
if [ ${N} -eq 1 ]; then
|
if [ ${FOUND} -eq 0 ]; then
|
||||||
|
LogText "Result: no listen statement found in CUPS configuration file"
|
||||||
|
elif [ ${N} -eq 1 ]; then
|
||||||
if [ "${FIND}" = "localhost:631" -o "${FIND}" = "127.0.0.1:631" ]; then
|
if [ "${FIND}" = "localhost:631" -o "${FIND}" = "127.0.0.1:631" ]; then
|
||||||
LogText "Result: CUPS daemon only running on localhost"
|
LogText "Result: CUPS daemon only running on localhost"
|
||||||
AddHP 2 2
|
AddHP 2 2
|
||||||
else
|
else
|
||||||
LogText "Result: CUPS daemon running on one or more interfaces (not limited to localhost)"
|
LogText "Result: CUPS daemon running on one or more interfaces (not limited to localhost)"
|
||||||
ReportSuggestion ${TEST_NO} "Check CUPS configuration if it really needs to listen on the network"
|
ReportSuggestion ${TEST_NO} "Check CUPS configuration if it really needs to listen on the network"
|
||||||
AddHP 1 2
|
AddHP 1 2
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
LogText "Result: CUPS daemon is running on several network addresses"
|
LogText "Result: CUPS daemon is running on several network addresses"
|
||||||
ReportSuggestion ${TEST_NO} "Check CUPS configuration if it really needs to run on several network addresses"
|
ReportSuggestion ${TEST_NO} "Check CUPS configuration if it really needs to run on several network addresses"
|
||||||
AddHP 1 2
|
AddHP 1 2
|
||||||
|
@ -177,7 +176,7 @@
|
||||||
if [ ${N} -eq 0 ]; then
|
if [ ${N} -eq 0 ]; then
|
||||||
Display --indent 2 --text "- Checking CUPS addresses/sockets" --result "${STATUS_NONE}" --color WHITE
|
Display --indent 2 --text "- Checking CUPS addresses/sockets" --result "${STATUS_NONE}" --color WHITE
|
||||||
LogText "Result: no addresses found on which CUPS daemon is listening"
|
LogText "Result: no addresses found on which CUPS daemon is listening"
|
||||||
else
|
else
|
||||||
Display --indent 2 --text "- Checking CUPS addresses/sockets" --result "${STATUS_FOUND}" --color GREEN
|
Display --indent 2 --text "- Checking CUPS addresses/sockets" --result "${STATUS_FOUND}" --color GREEN
|
||||||
LogText "Result: CUPS daemon is listening on network/socket"
|
LogText "Result: CUPS daemon is listening on network/socket"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue