aboutsummaryrefslogtreecommitdiffstats
path: root/cron-sh/scripts
diff options
context:
space:
mode:
authorMichael Scherer <misc@mandriva.org>2010-01-28 03:58:54 +0000
committerMichael Scherer <misc@mandriva.org>2010-01-28 03:58:54 +0000
commit2ede59c95a624529f264880e928b38cfdbd8da32 (patch)
tree3e07f9fa0ddee8d4de3efbd87db16760f0cddf20 /cron-sh/scripts
parent403673fa8bf210647bc7efe5d9a4f0f1182b3d1f (diff)
downloadmsec-2ede59c95a624529f264880e928b38cfdbd8da32.tar
msec-2ede59c95a624529f264880e928b38cfdbd8da32.tar.gz
msec-2ede59c95a624529f264880e928b38cfdbd8da32.tar.bz2
msec-2ede59c95a624529f264880e928b38cfdbd8da32.tar.xz
msec-2ede59c95a624529f264880e928b38cfdbd8da32.zip
- check if chkrootkit was removed and send a warning otherwise, and also check if chkrootkit was installed
before sending diff, fixing #51309
Diffstat (limited to 'cron-sh/scripts')
-rwxr-xr-xcron-sh/scripts/04_rootkit.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/cron-sh/scripts/04_rootkit.sh b/cron-sh/scripts/04_rootkit.sh
index c1c8503..8060343 100755
--- a/cron-sh/scripts/04_rootkit.sh
+++ b/cron-sh/scripts/04_rootkit.sh
@@ -15,6 +15,9 @@ CHKROOTKIT_DIFF="/var/log/security/chkrootkit.diff"
if [[ -f ${CHKROOTKIT_TODAY} ]]; then
mv ${CHKROOTKIT_TODAY} ${CHKROOTKIT_YESTERDAY};
+ if [ ! -x /usr/sbin/chkrootkit ]; then
+ printf "\nSecurity Warning: chkrootkit is enabled but was uninstalled\n" >> ${CHKROOTKIT_DIFF}
+ fi
fi
### chkrootkit checks
@@ -41,6 +44,7 @@ fi
### Changed chkrootkit
if [[ ${CHECK_CHKROOTKIT} == yes ]]; then
- Diffcheck ${CHKROOTKIT_TODAY} ${CHKROOTKIT_YESTERDAY} ${CHKROOTKIT_DIFF} "chkrootkit results"
+ if [ -x /usr/sbin/chkrootkit ]; then
+ Diffcheck ${CHKROOTKIT_TODAY} ${CHKROOTKIT_YESTERDAY} ${CHKROOTKIT_DIFF} "chkrootkit results"
+ fi
fi
-