diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2016-05-02 20:12:55 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2016-05-02 20:12:55 +0300 |
commit | 2205866521119b15556cf7085847f42a07459890 (patch) | |
tree | 3677f2f066156ce0669c0a22ed0e83bd36749433 /include/tests_logging | |
parent | 2b522761109bf765a57cc4cfc7103b3d34a2ab93 (diff) |
Remove tabs, test for all Red Hat clones, enhanced text
Diffstat (limited to 'include/tests_logging')
-rw-r--r-- | include/tests_logging | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/include/tests_logging b/include/tests_logging index 662aaacf..19dfea0b 100644 --- a/include/tests_logging +++ b/include/tests_logging @@ -472,21 +472,21 @@ # Test : LOGG-2190 # Description : Checking deleted files if [ ! "${LSOFBINARY}" = "" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi - Register --test-no LOGG-2190 --preqs-met ${PREQS_MET} --weight L --network NO --description "Checking deleted files in file table" + Register --test-no LOGG-2190 --preqs-met ${PREQS_MET} --weight L --network NO --description "Checking for deleted files in use" if [ ${SKIPTEST} -eq 0 ]; then LogText "Test: checking deleted files that are still in use" - - LSOF_GREP="WARNING|Output information" - if [ "${GRSECFOUND}" -ne 0 ]; then + + LSOF_GREP="WARNING|Output information" + if [ ${GRSECFOUND} -eq 1 ]; then # grsecurity causes Fail2Ban to hold onto deleted in-use files in /var/tmp - LSOF_GREP="${LSOF_GREP}|fail2ban" + LSOF_GREP="${LSOF_GREP}|fail2ban" fi - if [ "${OS_NAME}" = "CentOS" -o "${OS_NAME}" = "Red Hat Enterprise Linux" ]; then + if [ ${OS_REDHAT_OR_CLONE} -eq 1 ]; then # If lynis is run from /etc/cron.daily some deleted in-use files are kept in /tmp - LSOF_GREP="${LSOF_GREP}|anacron|awk|run-parts" + LSOF_GREP="${LSOF_GREP}|anacron|awk|run-parts" fi - FIND=`${LSOFBINARY} -n +L 1 2>&1 | egrep -vw "${LSOF_GREP}" | awk '{ if ($5=="REG") { printf "%s(%s)\n", $10, $1 } }' | grep -v "^$" | sort -u` + FIND=`${LSOFBINARY} -n +L 1 2>&1 | egrep -vw "${LSOF_GREP}" | awk '{ if ($5=="REG") { printf "%s(%s)\n", $10, $1 } }' | grep -v "^$" | sort -u` if [ ! "${FIND}" = "" ]; then LogText "Result: found one or more files which are deleted, but still in use" for I in ${FIND}; do |