Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Boelen <michael.boelen@cisofy.com>2020-04-02 15:45:44 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2020-04-02 15:45:44 +0300
commit6eb204a85d9e48adef4e8c62bbb794830060ac40 (patch)
tree4196ae3466d2871ba9e0db6ac51d0f4518cf2434 /include/tests_printers_spoolers
parentca6fc134ddee6b408bf1381a4346b15b0791c8ab (diff)
[PRNT-2308] check for Port statement and minor adjustments to test
Diffstat (limited to 'include/tests_printers_spoolers')
-rw-r--r--include/tests_printers_spoolers13
1 files changed, 10 insertions, 3 deletions
diff --git a/include/tests_printers_spoolers b/include/tests_printers_spoolers
index 18c48beb..b8435493 100644
--- a/include/tests_printers_spoolers
+++ b/include/tests_printers_spoolers
@@ -144,14 +144,21 @@
FIND=$(${EGREPBINARY} "^(SSL)?Listen" ${CUPSD_CONFIG_FILE} | ${GREPBINARY} -v "/" | ${AWKBINARY} '{ print $2 }')
COUNT=0
for ITEM in ${FIND}; do
- LogText "Found network address: ${ITEM}"
+ LogText "Result: found network address: ${ITEM}"
COUNT=$((COUNT + 1))
FOUND=1
done
- # Check if daemon is only running on localhost
+ # Search for Port statement
+ FIND=$(${EGREPBINARY} "^Port 631" ${CUPSD_CONFIG_FILE})
+ if [ -n "${FIND}" ]; then
+ LogText "Result: found CUPS listening on port 631 (most likely all interfaces)"
+ FOUND=1
+ fi
+
+ # Check if daemon might be running on localhost
if [ ${FOUND} -eq 0 ]; then
- LogText "Result: no listen statement found in CUPS configuration file"
+ LogText "Result: CUPS does not look to be listening on a network port"
elif [ ${COUNT} -eq 1 ]; then
if [ "${FIND}" = "localhost:631" -o "${FIND}" = "127.0.0.1:631" ]; then
LogText "Result: CUPS daemon only running on localhost"