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>2016-07-05 13:19:43 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2016-07-05 13:19:43 +0300
commit6c24c198ee6ff675873e97beef07ea9a9ba4de00 (patch)
tree21444a1a2db3a45e54cebb1559577186eb0efc5c /include
parentfbd24b585adb8cc71243785e40fefafb38eaa14e (diff)
[PRNT-2306] Check if files are readable before parsing them
Diffstat (limited to 'include')
-rw-r--r--include/tests_printers_spools6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/tests_printers_spools b/include/tests_printers_spools
index 050ff36f..4ebd146f 100644
--- a/include/tests_printers_spools
+++ b/include/tests_printers_spools
@@ -91,8 +91,10 @@
LogText "Test: Searching cupsd configuration file"
for I in ${CUPSD_CONFIG_LOCS}; do
if [ -f ${I}/cupsd.conf ]; then
- CUPSD_CONFIG_FILE="${I}/cupsd.conf"
- LogText "Result: found ${CUPSD_CONFIG_FILE}"
+ if FileIsReadable ${I}/cupsd.conf; then
+ CUPSD_CONFIG_FILE="${I}/cupsd.conf"
+ LogText "Result: found ${CUPSD_CONFIG_FILE}"
+ fi
fi
done
if [ ! "${CUPSD_CONFIG_FILE}" = "" ]; then