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>2019-07-31 09:17:15 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2019-07-31 09:17:15 +0300
commit3ea66d429850373affa0854d4509259d56a4e908 (patch)
tree427938afd239cb0c95c6f6180826162a9441f9a1 /include/tests_logging
parent4b77e27495c9447e09f348d191b14b4b72694b33 (diff)
[LOGG-2154] corrected output of files in /etc/rsyslog.d directory
Diffstat (limited to 'include/tests_logging')
-rw-r--r--include/tests_logging10
1 files changed, 4 insertions, 6 deletions
diff --git a/include/tests_logging b/include/tests_logging
index 3f563213..8e299ad0 100644
--- a/include/tests_logging
+++ b/include/tests_logging
@@ -346,8 +346,7 @@
DATA=""
TARGET="${ROOTDIR}etc/rsyslog.conf"
if [ -f ${TARGET} ]; then
- LogText "Result: file ${TARGET} exists"
- LogText "Test: analyzing file for remote target"
+ LogText "Test: analyzing file ${TARGET} for remote target"
DATA=$(${EGREPBINARY} "@@?([a-zA-Z0-9\-])+(\.)?(([a-zA-Z0-9-])+)?(\.)?(([a-zA-Z0-9-])+)?(\.)?(([a-zA-Z0-9-])+)?(\.)?(([a-zA-Z0-9-])+)?" ${TARGET} | ${GREPBINARY} -v "#" | ${TRBINARY} -cd "[:print:]\n" | ${SEDBINARY} 's/[[:blank:]]\{1,\}/:space:/g')
if [ -z "${DATA}" ]; then
LogText "Result: no remote target found"
@@ -364,11 +363,10 @@
fi
TARGET="${ROOTDIR}etc/rsyslog.d"
if [ -d ${TARGET} ]; then
- FILES=$(${FINDBINARY} ${TARGET} -type f -print0 | ${TRBINARY} -cd '[:print:]\0' | ${SEDBINARY} 's/[[:blank:]]/:space:/g' | ${SEDBINARY} 's/\0/\n/g')
- for F in "${FILES}"; do
+ FILES=$(${FINDBINARY} ${TARGET} -type f -print0 | ${TRBINARY} -cd '[:print:]\0' | ${SEDBINARY} 's/[[:blank:]]/:space:/g' | ${TRBINARY} '\0' ' ')
+ for F in ${FILES}; do
F=$(echo ${F} | ${SEDBINARY} 's/:space:/ /g')
- LogText "Result: found file ${F}"
- LogText "Test: analyzing file for remote target"
+ LogText "Test: analyzing file ${F} for remote target"
DATA=$(${EGREPBINARY} "@@?([a-zA-Z0-9\-])+(\.)?(([a-zA-Z0-9-])+)?(\.)?(([a-zA-Z0-9-])+)?(\.)?(([a-zA-Z0-9-])+)?(\.)?(([a-zA-Z0-9-])+)?" ${F} | ${GREPBINARY} -v "#" | ${TRBINARY} -cd "[:print:]\n" | ${SEDBINARY} 's/[[:blank:]]\{1,\}/:space:/g')
if [ -z "${DATA}" ]; then
LogText "Result: no remote target found"