mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-30 01:04:39 +02:00
Corrected logging for tests related to /etc/newsyslog.conf parsing
This commit is contained in:
parent
41e08807c9
commit
5fe1e6dd65
@ -377,7 +377,7 @@
|
|||||||
# Test : LOGG-2162
|
# Test : LOGG-2162
|
||||||
# Description : Check for directories in /etc/newsyslog.conf
|
# Description : Check for directories in /etc/newsyslog.conf
|
||||||
if [ -f /etc/newsyslog.conf ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
|
if [ -f /etc/newsyslog.conf ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
|
||||||
Register --test-no LOGG-2162 --preqs-met ${PREQS_MET} --weight L --network NO --description "Checking /etc/newsyslog.conf"
|
Register --test-no LOGG-2162 --preqs-met ${PREQS_MET} --weight L --network NO --description "Checking directories in /etc/newsyslog.conf"
|
||||||
if [ ${SKIPTEST} -eq 0 ]; then
|
if [ ${SKIPTEST} -eq 0 ]; then
|
||||||
logtext "Test: parsing directories from /etc/newsyslog.conf file"
|
logtext "Test: parsing directories from /etc/newsyslog.conf file"
|
||||||
FIND=`cat /etc/newsyslog.conf | sort | uniq | grep "^/" | awk '{ print $1 }' | sed 's/\/*[a-zA-Z_.-]*$//g' | sort | uniq`
|
FIND=`cat /etc/newsyslog.conf | sort | uniq | grep "^/" | awk '{ print $1 }' | sed 's/\/*[a-zA-Z_.-]*$//g' | sort | uniq`
|
||||||
@ -397,9 +397,9 @@
|
|||||||
# Test : LOGG-2164
|
# Test : LOGG-2164
|
||||||
# Description : Check for files in /etc/newsyslog.conf
|
# Description : Check for files in /etc/newsyslog.conf
|
||||||
if [ -f /etc/newsyslog.conf ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
|
if [ -f /etc/newsyslog.conf ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
|
||||||
Register --test-no LOGG-2164 --preqs-met ${PREQS_MET} --weight L --network NO --description "Checking /etc/newsyslog.conf"
|
Register --test-no LOGG-2164 --preqs-met ${PREQS_MET} --weight L --network NO --description "Checking files specified /etc/newsyslog.conf"
|
||||||
if [ ${SKIPTEST} -eq 0 ]; then
|
if [ ${SKIPTEST} -eq 0 ]; then
|
||||||
logtext "Test: parsing directories from /etc/newsyslog.conf file"
|
logtext "Test: parsing files from /etc/newsyslog.conf file"
|
||||||
FIND=`cat /etc/newsyslog.conf | sort | uniq | grep "^/" | awk '{ print $1 }'`
|
FIND=`cat /etc/newsyslog.conf | sort | uniq | grep "^/" | awk '{ print $1 }'`
|
||||||
for I in ${FIND}; do
|
for I in ${FIND}; do
|
||||||
if [ -f ${I} ]; then
|
if [ -f ${I} ]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user