mirror of https://github.com/CISOfy/lynis.git
Improved detection of directories in logrotate
This commit is contained in:
parent
c70f3e93cd
commit
bb696a04f1
|
@ -274,7 +274,7 @@
|
|||
Register --test-no LOGG-2150 --weight L --preqs-met ${PREQS_MET} --network NO --description "Checking directories in logrotate configuration"
|
||||
if [ ${SKIPTEST} -eq 0 ]; then
|
||||
logtext "Test: Checking which directories can be found in logrotate configuration"
|
||||
FIND=`${LOGROTATEBINARY} -d -v /etc/logrotate.conf 2>&1 | egrep "considering log|skipping" | grep -v '*' | sort | uniq | awk '{ if ($2=="log") { print $3 } }' | sed 's/\/*[a-zA-Z_.-]*$//g' | sort | uniq`
|
||||
FIND=`${LOGROTATEBINARY} -d -v /etc/logrotate.conf 2>&1 | egrep "considering log|skipping" | grep -v '*' | sort | uniq | awk '{ if ($2=="log") { print $3 } }' | sed 's@/[^/]*$@@g' | sort | uniq`
|
||||
if [ "${FIND}" = "" ]; then
|
||||
logtext "Result: nothing found"
|
||||
else
|
||||
|
@ -285,7 +285,6 @@
|
|||
report "log_directory[]=${I}"
|
||||
else
|
||||
logtext "Directory could not be found: ${I}"
|
||||
# YYY strip more parts of the name, until it can be found (and stop at /)
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue