2014-08-26 17:33:55 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
#################################################################################
|
|
|
|
#
|
|
|
|
# Lynis
|
|
|
|
# ------------------
|
|
|
|
#
|
2016-03-13 16:00:39 +01:00
|
|
|
# Copyright 2007-2013, Michael Boelen
|
2021-01-07 15:22:19 +01:00
|
|
|
# Copyright 2007-2021, CISOfy
|
2016-03-13 16:00:39 +01:00
|
|
|
#
|
|
|
|
# Website : https://cisofy.com
|
|
|
|
# Blog : http://linux-audit.com
|
|
|
|
# GitHub : https://github.com/CISOfy/lynis
|
2014-08-26 17:33:55 +02:00
|
|
|
#
|
|
|
|
# Lynis comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
|
|
|
|
# welcome to redistribute it under the terms of the GNU General Public License.
|
|
|
|
# See LICENSE file for usage of this software.
|
|
|
|
#
|
|
|
|
#################################################################################
|
|
|
|
#
|
|
|
|
# Printers and spools
|
|
|
|
#
|
|
|
|
#################################################################################
|
|
|
|
#
|
2017-04-23 20:06:54 +02:00
|
|
|
CUPSD_CONFIG_LOCS="${ROOTDIR}etc/cups ${ROOTDIR}usr/local/etc/cups ${ROOTDIR}private/etc/cups"
|
2014-08-26 17:33:55 +02:00
|
|
|
CUPSD_CONFIG_FILE=""
|
|
|
|
CUPSD_RUNNING=0
|
|
|
|
CUPSD_FOUND=0
|
|
|
|
LPD_RUNNING=0
|
|
|
|
PRINTING_DAEMON=""
|
2014-10-14 10:03:54 +02:00
|
|
|
QDAEMON_CONFIG_ENABLED=0
|
|
|
|
QDAEMON_CONFIG_FILE=""
|
|
|
|
QDAEMON_RUNNING=0
|
2014-08-26 17:33:55 +02:00
|
|
|
#
|
|
|
|
#################################################################################
|
|
|
|
#
|
2020-10-22 00:13:42 +02:00
|
|
|
InsertSection "${SECTION_PRINTERS_AND_SPOOLS}"
|
2014-08-26 17:33:55 +02:00
|
|
|
#
|
|
|
|
#################################################################################
|
|
|
|
#
|
|
|
|
# Test : PRNT-2302
|
|
|
|
# Description : Check printcap file consistency
|
2016-07-24 17:22:00 +02:00
|
|
|
Register --test-no PRNT-2302 --os FreeBSD --weight L --network NO --category security --description "Check for printcap consistency"
|
2014-08-26 17:33:55 +02:00
|
|
|
if [ ${SKIPTEST} -eq 0 ]; then
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Test: Searching /usr/sbin/chkprintcap"
|
2017-04-23 20:06:54 +02:00
|
|
|
if [ ! -f ${ROOTDIR}usr/sbin/chkprintcap ]; then
|
2016-06-18 11:14:01 +02:00
|
|
|
Display --indent 2 --text "- Checking chkprintcap" --result "${STATUS_NOT_FOUND}" --color WHITE
|
2017-04-23 20:06:54 +02:00
|
|
|
LogText "Result: ${ROOTDIR}usr/sbin/chkprintcap NOT found, test skipped"
|
2017-04-30 17:59:35 +02:00
|
|
|
else
|
2017-04-23 20:06:54 +02:00
|
|
|
LogText "Result: ${ROOTDIR}usr/sbin/chkprintcap found"
|
|
|
|
FIND=$(${ROOTDIR}usr/sbin/chkprintcap > /dev/null ; echo $?)
|
2014-08-26 17:33:55 +02:00
|
|
|
# Only an exit code of zero should come back. Use string instead of integer, due unexpected trash
|
|
|
|
if [ "${FIND}" = "0" ]; then
|
2016-06-18 11:14:01 +02:00
|
|
|
Display --indent 2 --text "- Integrity check of printcap file" --result "${STATUS_OK}" --color GREEN
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: chkprintcap did NOT gave any warnings"
|
2017-04-23 20:06:54 +02:00
|
|
|
else
|
2016-06-18 11:14:01 +02:00
|
|
|
Display --indent 2 --text "- Integrity check of printcap file" --result "${STATUS_WARNING}" --color RED
|
2019-12-18 12:17:46 +01:00
|
|
|
ReportSuggestion "${TEST_NO}" "Run chkprintcap manually to test printcap file"
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Output from chkprintcap: ${FIND}"
|
2017-04-23 20:06:54 +02:00
|
|
|
LogText "Run chkprintcap and check the ${ROOTDIR}etc/printcap file"
|
2014-08-26 17:33:55 +02:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
#
|
|
|
|
#################################################################################
|
|
|
|
#
|
|
|
|
# Test : PRNT-2304
|
|
|
|
# Description : Check cupsd status
|
2016-07-24 17:22:00 +02:00
|
|
|
Register --test-no PRNT-2304 --weight L --network NO --category security --description "Check cupsd status"
|
2014-08-26 17:33:55 +02:00
|
|
|
if [ ${SKIPTEST} -eq 0 ]; then
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Test: Checking cupsd status"
|
2019-07-26 11:32:48 +02:00
|
|
|
if IsRunning "cupsd"; then
|
2016-06-18 11:14:01 +02:00
|
|
|
Display --indent 2 --text "- Checking cups daemon" --result "${STATUS_RUNNING}" --color GREEN
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: cups daemon running"
|
2014-08-26 17:33:55 +02:00
|
|
|
CUPSD_RUNNING=1; PRINTING_DAEMON="cups"
|
2017-04-23 20:06:54 +02:00
|
|
|
else
|
2016-06-18 11:14:01 +02:00
|
|
|
Display --indent 2 --text "- Checking cups daemon" --result "${STATUS_NOT_FOUND}" --color WHITE
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: cups daemon not running, cups daemon tests skipped"
|
2014-08-26 17:33:55 +02:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
#
|
|
|
|
#################################################################################
|
|
|
|
#
|
|
|
|
# Test : PRNT-2306
|
|
|
|
# Description : Check CUPSd configuration file
|
|
|
|
if [ ${CUPSD_RUNNING} -eq 1 ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
|
2016-07-24 17:22:00 +02:00
|
|
|
Register --test-no PRNT-2306 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Check CUPSd configuration file"
|
2014-08-26 17:33:55 +02:00
|
|
|
if [ ${SKIPTEST} -eq 0 ]; then
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Test: Searching cupsd configuration file"
|
2017-04-30 17:59:35 +02:00
|
|
|
for DIR in ${CUPSD_CONFIG_LOCS}; do
|
|
|
|
if [ -f ${DIR}/cupsd.conf ]; then
|
|
|
|
if FileIsReadable ${DIR}/cupsd.conf; then
|
|
|
|
CUPSD_CONFIG_FILE="${DIR}/cupsd.conf"
|
2016-07-05 12:19:43 +02:00
|
|
|
LogText "Result: found ${CUPSD_CONFIG_FILE}"
|
|
|
|
fi
|
2014-08-26 17:33:55 +02:00
|
|
|
fi
|
|
|
|
done
|
2017-04-30 17:59:35 +02:00
|
|
|
if HasData "${CUPSD_CONFIG_FILE}"; then
|
2016-06-18 11:14:01 +02:00
|
|
|
Display --indent 2 --text "- Checking CUPS configuration file" --result "${STATUS_OK}" --color GREEN
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: configuration file found (${CUPSD_CONFIG_FILE})"
|
2014-08-26 17:33:55 +02:00
|
|
|
CUPSD_FOUND=1
|
2017-04-30 17:59:35 +02:00
|
|
|
else
|
2016-06-18 11:14:01 +02:00
|
|
|
Display --indent 2 --text "- Checking CUPS configuration file" --result "${STATUS_NOT_FOUND}" --color RED
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: configuration file not found"
|
|
|
|
LogText "Development: no CUPS configuration file found"
|
2014-08-26 17:33:55 +02:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
#
|
|
|
|
#################################################################################
|
|
|
|
#
|
|
|
|
# Test : PRNT-2307
|
|
|
|
# Description : Check CUPSd configuration file permissions
|
2017-04-30 17:59:35 +02:00
|
|
|
# TODO : Add function
|
2014-08-26 17:33:55 +02:00
|
|
|
if [ ${CUPSD_FOUND} -eq 1 ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
|
2016-07-24 17:22:00 +02:00
|
|
|
Register --test-no PRNT-2307 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Check CUPSd configuration file permissions"
|
2014-08-26 17:33:55 +02:00
|
|
|
if [ ${SKIPTEST} -eq 0 ]; then
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Test: Checking CUPS configuration file permissions"
|
2017-04-30 17:59:35 +02:00
|
|
|
FIND=$(${LSBINARY} -l ${CUPSD_CONFIG_FILE} | ${CUTBINARY} -c 2-10)
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: found ${FIND}"
|
2019-10-23 22:47:03 +02:00
|
|
|
case "${FIND}" in
|
|
|
|
r[w-]-[r-][w-]---- )
|
|
|
|
Display --indent 4 --text "- File permissions" --result "${STATUS_OK}" --color GREEN
|
|
|
|
AddHP 1 1
|
|
|
|
;;
|
|
|
|
* )
|
|
|
|
Display --indent 4 --text "- File permissions" --result "${STATUS_WARNING}" --color RED
|
2019-12-18 12:17:46 +01:00
|
|
|
ReportSuggestion "${TEST_NO}" "Access to CUPS configuration could be more strict."
|
2019-10-23 22:47:03 +02:00
|
|
|
AddHP 1 2
|
|
|
|
;;
|
|
|
|
esac
|
2014-08-26 17:33:55 +02:00
|
|
|
fi
|
|
|
|
#
|
|
|
|
#################################################################################
|
|
|
|
#
|
|
|
|
# Test : PRNT-2308
|
|
|
|
# Description : Check CUPS daemon network configuration
|
2020-04-02 13:15:03 +02:00
|
|
|
# Notes : Listen and SSLListen can be used
|
2014-08-26 17:33:55 +02:00
|
|
|
if [ ${CUPSD_FOUND} -eq 1 ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
|
2016-07-24 17:22:00 +02:00
|
|
|
Register --test-no PRNT-2308 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Check CUPSd network configuration"
|
2014-08-26 17:33:55 +02:00
|
|
|
if [ ${SKIPTEST} -eq 0 ]; then
|
|
|
|
FOUND=0
|
2022-01-01 17:53:06 +01:00
|
|
|
PORT_FOUND=0
|
|
|
|
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Test: Checking CUPS daemon listening network addresses"
|
2022-01-01 17:53:06 +01:00
|
|
|
|
|
|
|
# Search for Port statement
|
2023-04-23 23:38:21 +02:00
|
|
|
FIND=$(${GREPBINARY} -E "^Port 631" ${CUPSD_CONFIG_FILE})
|
2022-01-01 17:53:06 +01:00
|
|
|
if [ -n "${FIND}" ]; then
|
|
|
|
LogText "Result: found CUPS listening on port 631 (most likely all interfaces)"
|
|
|
|
PORT_FOUND=1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Checking network addresses
|
2023-04-23 23:38:21 +02:00
|
|
|
FIND=$(${GREPBINARY} -E "^(SSL)?Listen" ${CUPSD_CONFIG_FILE} | ${GREPBINARY} -v "/" | ${AWKBINARY} '{ print $2 }')
|
2017-04-30 17:59:35 +02:00
|
|
|
COUNT=0
|
|
|
|
for ITEM in ${FIND}; do
|
2020-04-02 14:45:44 +02:00
|
|
|
LogText "Result: found network address: ${ITEM}"
|
2017-04-30 17:59:35 +02:00
|
|
|
COUNT=$((COUNT + 1))
|
2014-08-26 17:33:55 +02:00
|
|
|
FOUND=1
|
|
|
|
done
|
|
|
|
|
2020-04-02 14:45:44 +02:00
|
|
|
# Check if daemon might be running on localhost
|
2022-01-01 17:53:06 +01:00
|
|
|
if [ ${FOUND} -eq 0 -a ${PORT_FOUND} -eq 0 ]; then
|
2020-04-02 14:45:44 +02:00
|
|
|
LogText "Result: CUPS does not look to be listening on a network port"
|
2022-01-01 17:53:06 +01:00
|
|
|
elif [ ${COUNT} -eq 1 -a ${PORT_FOUND} -eq 0 ]; then
|
2014-08-26 17:33:55 +02:00
|
|
|
if [ "${FIND}" = "localhost:631" -o "${FIND}" = "127.0.0.1:631" ]; then
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: CUPS daemon only running on localhost"
|
2014-08-26 17:33:55 +02:00
|
|
|
AddHP 2 2
|
2017-03-20 13:12:55 +01:00
|
|
|
else
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: CUPS daemon running on one or more interfaces (not limited to localhost)"
|
2019-12-18 12:17:46 +01:00
|
|
|
ReportSuggestion "${TEST_NO}" "Check CUPS configuration if it really needs to listen on the network"
|
2014-08-26 17:33:55 +02:00
|
|
|
AddHP 1 2
|
|
|
|
fi
|
2017-03-20 13:12:55 +01:00
|
|
|
else
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: CUPS daemon is running on several network addresses"
|
2019-12-18 12:17:46 +01:00
|
|
|
ReportSuggestion "${TEST_NO}" "Check CUPS configuration if it really needs to run on several network addresses"
|
2014-08-26 17:33:55 +02:00
|
|
|
AddHP 1 2
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Checking sockets
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Test: Checking cups daemon listening sockets"
|
2017-03-06 08:41:21 +01:00
|
|
|
FIND=$(${GREPBINARY} "^Listen" ${CUPSD_CONFIG_FILE} | ${GREPBINARY} "/" | ${AWKBINARY} '{ print $2 }')
|
2017-04-30 17:59:35 +02:00
|
|
|
for ITEM in ${FIND}; do
|
|
|
|
LogText "Found socket address: ${ITEM}"
|
|
|
|
COUNT=$((COUNT + 1))
|
2014-08-26 17:33:55 +02:00
|
|
|
done
|
|
|
|
|
2017-04-30 17:59:35 +02:00
|
|
|
if [ ${COUNT} -eq 0 ]; then
|
2016-06-18 11:14:01 +02:00
|
|
|
Display --indent 2 --text "- Checking CUPS addresses/sockets" --result "${STATUS_NONE}" --color WHITE
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: no addresses found on which CUPS daemon is listening"
|
2017-03-20 13:12:55 +01:00
|
|
|
else
|
2016-06-18 11:14:01 +02:00
|
|
|
Display --indent 2 --text "- Checking CUPS addresses/sockets" --result "${STATUS_FOUND}" --color GREEN
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: CUPS daemon is listening on network/socket"
|
2014-08-26 17:33:55 +02:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
#
|
|
|
|
#################################################################################
|
|
|
|
#
|
|
|
|
# Test : PRNT-2314
|
|
|
|
# Description : Check lpd status
|
2016-07-24 17:22:00 +02:00
|
|
|
Register --test-no PRNT-2314 --weight L --network NO --category security --description "Check lpd status"
|
2014-08-26 17:33:55 +02:00
|
|
|
if [ ${SKIPTEST} -eq 0 ]; then
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Test: Checking lpd status"
|
2019-07-26 11:32:48 +02:00
|
|
|
if IsRunning "lpd"; then
|
2016-06-18 11:14:01 +02:00
|
|
|
Display --indent 2 --text "- Checking lp daemon" --result "${STATUS_RUNNING}" --color GREEN
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: lp daemon running"
|
2014-08-26 17:33:55 +02:00
|
|
|
LPD_RUNNING=1; PRINTING_DAEMON="lp"
|
2017-04-23 20:06:54 +02:00
|
|
|
else
|
2016-06-18 11:14:01 +02:00
|
|
|
Display --indent 2 --text "- Checking lp daemon" --result "${STATUS_NOT_RUNNING}" --color WHITE
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: lp daemon not running"
|
2014-08-26 17:33:55 +02:00
|
|
|
AddHP 4 4
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
#
|
|
|
|
#################################################################################
|
2014-10-14 10:03:54 +02:00
|
|
|
#
|
2018-02-09 12:37:10 +01:00
|
|
|
# Test : PRNT-2316
|
2014-10-14 10:03:54 +02:00
|
|
|
# Description : Check /etc/qconfig file
|
2016-07-24 17:22:00 +02:00
|
|
|
Register --test-no PRNT-2316 --os AIX --weight L --network NO --category security --description "Checking /etc/qconfig file"
|
2014-10-14 10:03:54 +02:00
|
|
|
if [ ${SKIPTEST} -eq 0 ]; then
|
2017-04-23 20:06:54 +02:00
|
|
|
LogText "Test: Checking ${ROOTDIR}etc/qconfig"
|
|
|
|
QDAEMON_CONFIG_FILE="${ROOTDIR}etc/qconfig"
|
2014-10-14 10:03:54 +02:00
|
|
|
FileIsReadable ${QDAEMON_CONFIG_FILE}
|
|
|
|
if [ ${CANREAD} -eq 1 ]; then
|
2023-04-23 23:38:21 +02:00
|
|
|
FIND=$(${GREPBINARY} -v "^\*" ${QDAEMON_CONFIG_FILE} | ${GREPBINARY} -E "backend|device")
|
2019-07-16 13:20:30 +02:00
|
|
|
if [ -n "${FIND}" ]; then
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: printers are defined in ${QDAEMON_CONFIG_FILE}"
|
2016-06-18 11:14:01 +02:00
|
|
|
Display --indent 2 --text "- Checking /etc/qconfig file" --result "${STATUS_FOUND}" --color GREEN
|
2014-10-14 10:03:54 +02:00
|
|
|
QDAEMON_CONFIG_ENABLED=1
|
2017-04-23 20:06:54 +02:00
|
|
|
else
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: ${QDAEMON_CONFIG_FILE} is empty. No printers are defined"
|
2014-10-14 10:03:54 +02:00
|
|
|
Display --indent 2 --text "- Checking /etc/qconfig file" --result EMPTY --color WHITE
|
|
|
|
fi
|
2017-04-23 20:06:54 +02:00
|
|
|
else
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: Can not read ${QDAEMON_CONFIG_FILE} (no permission)"
|
2014-10-14 10:03:54 +02:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
#
|
|
|
|
#################################################################################
|
|
|
|
#
|
|
|
|
# Test : PRNT-2418
|
|
|
|
# Description : Check qdaemon printer spooler status
|
2016-07-24 17:22:00 +02:00
|
|
|
Register --test-no PRNT-2418 --os AIX --weight L --network NO --category security --description "Checking qdaemon printer spooler status"
|
2014-10-14 10:03:54 +02:00
|
|
|
if [ ${SKIPTEST} -eq 0 ]; then
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Test: Checking qdaemon status"
|
2019-07-26 11:32:48 +02:00
|
|
|
if IsRunning "qdaemon"; then
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: qdaemon daemon running"
|
2016-06-18 11:14:01 +02:00
|
|
|
Display --indent 2 --text "- Checking qdaemon daemon" --result "${STATUS_RUNNING}" --color GREEN
|
2014-10-14 10:03:54 +02:00
|
|
|
QDAEMON_RUNNING=1; PRINTING_DAEMON="qdaemon"
|
2017-04-30 17:59:35 +02:00
|
|
|
else
|
2014-10-14 10:03:54 +02:00
|
|
|
if [ ${QDAEMON_CONFIG_ENABLED} -eq 1 ]; then
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: qdaemon daemon not running"
|
2016-06-18 11:14:01 +02:00
|
|
|
Display --indent 2 --text "- Checking qdaemon daemon" --result "${STATUS_NOT_RUNNING}" --color RED
|
2019-12-18 12:17:46 +01:00
|
|
|
ReportSuggestion "${TEST_NO}" "Activate print spooler daemon (qdaemon) in order to process print jobs"
|
2017-04-30 17:59:35 +02:00
|
|
|
else
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: qdaemon daemon not running"
|
2016-06-18 11:14:01 +02:00
|
|
|
Display --indent 2 --text "- Checking qdaemon daemon" --result "${STATUS_NOT_RUNNING}" --color WHITE
|
2014-10-14 10:03:54 +02:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
#
|
|
|
|
#################################################################################
|
|
|
|
#
|
|
|
|
# Test : PRNT-2420
|
|
|
|
# Description : Checking old print jobs
|
2016-07-24 17:22:00 +02:00
|
|
|
Register --test-no PRNT-2420 --os AIX --weight L --network NO --category security --description "Checking old print jobs"
|
2014-10-14 10:03:54 +02:00
|
|
|
if [ ${SKIPTEST} -eq 0 ]; then
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Test: Checking old print jobs"
|
2017-04-30 17:59:35 +02:00
|
|
|
DirectoryExists ${ROOTDIR}var/spool/lpd/qdir
|
2014-10-14 10:03:54 +02:00
|
|
|
if [ ${DIRECTORY_FOUND} -eq 1 ]; then
|
2017-04-30 17:59:35 +02:00
|
|
|
FIND=$(find ${ROOTDIR}var/spool/lpd/qdir -type f -mtime +1 2> /dev/null | ${SEDBINARY} 's/ /!space!/g')
|
|
|
|
if HasData "${FIND}"; then
|
|
|
|
COUNT=0
|
|
|
|
for ITEM in ${FIND}; do
|
|
|
|
FILE=$(echo ${ITEM} | ${SEDBINARY} 's/!space!/ /g')
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Found old print job: ${FILE}"
|
2017-04-30 17:59:35 +02:00
|
|
|
COUNT=$((COUNT + 1))
|
2014-10-14 10:03:54 +02:00
|
|
|
done
|
2017-04-30 17:59:35 +02:00
|
|
|
LogText "Result: Found ${COUNT} old print jobs in /var/spool/lpd/qdir"
|
2016-06-18 11:14:01 +02:00
|
|
|
Display --indent 4 --text "- Checking old print jobs" --result "${STATUS_FOUND}" --color YELLOW
|
2019-12-18 12:17:46 +01:00
|
|
|
ReportSuggestion "${TEST_NO}" "Check old print jobs in /var/spool/lpd/qdir to prevent new jobs from being processed"
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Risk: Failed or defunct print jobs can occupy a lot of space and in some cases, prevent new jobs from being processed"
|
2017-04-23 20:06:54 +02:00
|
|
|
else
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: Old print jobs not found in /var/spool/lpd/qdir"
|
2016-06-18 11:14:01 +02:00
|
|
|
Display --indent 4 --text "- Checking old print jobs" --result "${STATUS_NONE}" --color GREEN
|
2014-10-14 10:03:54 +02:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
#
|
|
|
|
#################################################################################
|
2014-08-26 17:33:55 +02:00
|
|
|
#
|
|
|
|
|
2019-09-19 14:05:15 +02:00
|
|
|
if [ -n "${PRINTING_DAEMON}" ]; then Report "printing_daemon=${PRINTING_DAEMON}"; fi
|
2014-08-26 17:33:55 +02:00
|
|
|
|
2016-04-28 12:31:57 +02:00
|
|
|
WaitForKeyPress
|
2014-08-26 17:33:55 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
#================================================================================
|
2016-03-13 16:03:46 +01:00
|
|
|
# Lynis - Security Auditing and System Hardening for Linux and UNIX - https://cisofy.com
|