mirror of https://github.com/CISOfy/lynis.git
[LOGG-2154] corrected output of files in /etc/rsyslog.d directory
This commit is contained in:
parent
4b77e27495
commit
3ea66d4298
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue