diff options
author | Frederic Lepied <flepied@mandriva.com> | 2002-02-25 21:12:19 +0000 |
---|---|---|
committer | Frederic Lepied <flepied@mandriva.com> | 2002-02-25 21:12:19 +0000 |
commit | a6bb12035abfa2dcb9e93e76241d587d97deb51e (patch) | |
tree | 789709cb1596140f2c85efc744977eaee84d7a3d /cron-sh/security.sh | |
parent | 0433b2af4c5670867e19beff99bbbbb175eb1a1d (diff) | |
download | msec-a6bb12035abfa2dcb9e93e76241d587d97deb51e.tar msec-a6bb12035abfa2dcb9e93e76241d587d97deb51e.tar.gz msec-a6bb12035abfa2dcb9e93e76241d587d97deb51e.tar.bz2 msec-a6bb12035abfa2dcb9e93e76241d587d97deb51e.tar.xz msec-a6bb12035abfa2dcb9e93e76241d587d97deb51e.zip |
split rpm-va check in 2: config files and other files
Diffstat (limited to 'cron-sh/security.sh')
-rwxr-xr-x | cron-sh/security.sh | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/cron-sh/security.sh b/cron-sh/security.sh index 764bcc0..1c2dfec 100755 --- a/cron-sh/security.sh +++ b/cron-sh/security.sh @@ -43,6 +43,9 @@ UNOWNED_GROUP_DIFF="/var/log/security/unowned_group.diff" export RPM_VA_TODAY="/var/log/security/rpm-va.today" RPM_VA_YESTERDAY="/var/log/security/rpm-va.yesterday" RPM_VA_DIFF="/var/log/security/rpm-va.diff" +export RPM_VA_CONFIG_TODAY="/var/log/security/rpm-va-config.today" +RPM_VA_CONFIG_YESTERDAY="/var/log/security/rpm-va-config.yesterday" +RPM_VA_CONFIG_DIFF="/var/log/security/rpm-va-config.diff" export RPM_QA_TODAY="/var/log/security/rpm-qa.today" RPM_QA_YESTERDAY="/var/log/security/rpm-qa.yesterday" RPM_QA_DIFF="/var/log/security/rpm-qa.diff" @@ -94,6 +97,10 @@ if [[ -f ${RPM_VA_TODAY} ]]; then mv -f ${RPM_VA_TODAY} ${RPM_VA_YESTERDAY} fi +if [[ -f ${RPM_VA_CONFIG_TODAY} ]]; then + mv -f ${RPM_VA_CONFIG_TODAY} ${RPM_VA_CONFIG_YESTERDAY} +fi + if [[ -f ${RPM_QA_TODAY} ]]; then mv -f ${RPM_QA_TODAY} ${RPM_QA_YESTERDAY} fi @@ -147,8 +154,12 @@ if [[ ${RPM_CHECK} == yes ]]; then fi rpm -qa --qf "%{NAME}-%{VERSION}-%{RELEASE}\t%{INSTALLTIME}\n" | sort > ${RPM_QA_TODAY} - - nice --adjustment=+19 rpm -V `cut -f 1 < ${RPM_QA_TODAY} | grep -v '^dev-[0-9]'` | grep '^..5' | sed 's/...........//' | sort > ${RPM_VA_TODAY} + + rm -f ${RPM_VA_TODAY}.tmp + nice --adjustment=+19 rpm -V `cut -f 1 < ${RPM_QA_TODAY} | grep -v '^dev-[0-9]'` | grep '^..5' | sort > ${RPM_VA_TODAY}.tmp + grep -v '^.........c.' ${RPM_VA_TODAY}.tmp | sed 's/^...........//' | sort > ${RPM_VA_TODAY} + grep '^.........c.' ${RPM_VA_TODAY}.tmp | sed 's/^...........//' | sort > ${RPM_VA_CONFIG_TODAY} + rm -f ${RPM_VA_TODAY}.tmp fi ### chkrootkit checks |