aboutsummaryrefslogtreecommitdiffstats
path: root/cron-sh/diff_check.sh
diff options
context:
space:
mode:
Diffstat (limited to 'cron-sh/diff_check.sh')
-rwxr-xr-xcron-sh/diff_check.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/cron-sh/diff_check.sh b/cron-sh/diff_check.sh
index 2512a13..3c0fc27 100755
--- a/cron-sh/diff_check.sh
+++ b/cron-sh/diff_check.sh
@@ -184,6 +184,24 @@ if [[ ${RPM_CHECK} == yes ]]; then
fi
fi
+### Changed chkrootkit
+if [[ ${CHKROOTKIT_CHECK} == yes ]]; then
+
+ if [[ -f ${CHKROOTKIT_YESTERDAY} ]]; then
+ diff -u ${CHKROOTKIT_YESTERDAY} ${CHKROOTKIT_TODAY} 1> ${CHKROOTKIT_DIFF}
+ if [ -s ${CHKROOTKIT_DIFF} ]; then
+ printf "\nSecurity Warning: There are modifications for chkrootkit results :\n" >> ${TMP}
+ grep '^+' ${CHKROOTKIT_DIFF} | grep -vw "^+++ " | sed 's|^.||'|sed -e 's/%/%%/g' | while read file; do
+ printf "\t\t- Added : ${file}\n"
+ done >> ${TMP}
+ grep '^-' ${CHKROOTKIT_DIFF} | grep -vw "^--- " | sed 's|^.||'|sed -e 's/%/%%/g' | while read file; do
+ printf "\t\t- Removed : ${file}\n"
+ done >> ${TMP}
+ fi
+ fi
+fi
+
+
######## Report ######
date=`date`
hostname=`hostname`