mirror of https://github.com/CISOfy/lynis.git
[PRNT-2306] Check if files are readable before parsing them
This commit is contained in:
parent
fbd24b585a
commit
6c24c198ee
|
@ -91,8 +91,10 @@
|
||||||
LogText "Test: Searching cupsd configuration file"
|
LogText "Test: Searching cupsd configuration file"
|
||||||
for I in ${CUPSD_CONFIG_LOCS}; do
|
for I in ${CUPSD_CONFIG_LOCS}; do
|
||||||
if [ -f ${I}/cupsd.conf ]; then
|
if [ -f ${I}/cupsd.conf ]; then
|
||||||
CUPSD_CONFIG_FILE="${I}/cupsd.conf"
|
if FileIsReadable ${I}/cupsd.conf; then
|
||||||
LogText "Result: found ${CUPSD_CONFIG_FILE}"
|
CUPSD_CONFIG_FILE="${I}/cupsd.conf"
|
||||||
|
LogText "Result: found ${CUPSD_CONFIG_FILE}"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ ! "${CUPSD_CONFIG_FILE}" = "" ]; then
|
if [ ! "${CUPSD_CONFIG_FILE}" = "" ]; then
|
||||||
|
|
Loading…
Reference in New Issue