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:
authormboelen <michael@cisofy.com>2015-05-26 12:13:47 +0300
committermboelen <michael@cisofy.com>2015-05-26 12:13:47 +0300
commitbb696a04f12193ec06432fcf8e3312a601935b0d (patch)
tree51805b21dd11620a833d1d8e829c668371abdae2
parentc70f3e93cd7a79d7a579158a756ca2122f6ce0e7 (diff)
Improved detection of directories in logrotate
-rw-r--r--include/tests_logging3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/tests_logging b/include/tests_logging
index 0d8189a9..7346365a 100644
--- a/include/tests_logging
+++ b/include/tests_logging
@@ -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