aboutsummaryrefslogtreecommitdiffstats
path: root/init-sh
diff options
context:
space:
mode:
authorEugeni Dodonov <eugeni@mandriva.org>2010-02-08 14:07:10 +0000
committerEugeni Dodonov <eugeni@mandriva.org>2010-02-08 14:07:10 +0000
commit35aaa30c2a0ca81c6a9d55d4c1c1cb53d5228371 (patch)
tree6f2b4ad72368c5615c43d9bbe9f359535eefc6af /init-sh
parent066ecb8ae35048888b2b6e54fc97f68b8462aff7 (diff)
downloadmsec-35aaa30c2a0ca81c6a9d55d4c1c1cb53d5228371.tar
msec-35aaa30c2a0ca81c6a9d55d4c1c1cb53d5228371.tar.gz
msec-35aaa30c2a0ca81c6a9d55d4c1c1cb53d5228371.tar.bz2
msec-35aaa30c2a0ca81c6a9d55d4c1c1cb53d5228371.tar.xz
msec-35aaa30c2a0ca81c6a9d55d4c1c1cb53d5228371.zip
fixing check periodicity on upgrade
Diffstat (limited to 'init-sh')
-rwxr-xr-xinit-sh/upgrade.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/init-sh/upgrade.sh b/init-sh/upgrade.sh
index 065174d..ceacb24 100755
--- a/init-sh/upgrade.sh
+++ b/init-sh/upgrade.sh
@@ -87,10 +87,18 @@ if [ -f /etc/security/msec/security.conf ]; then
/etc/security/msec/security.conf
# CHECK_RPM split into CHECK_RPM_PACKAGES and CHECK_RPM_INTEGRITY
sed -i -e 's/CHECK_RPM=\(.*\)/CHECK_RPM_PACKAGES=\1\nCHECK_RPM_INTEGRITY=\1/g' /etc/security/msec/security.conf
- # starting with 2010.1, each check can have a different periodicity
+ # starting with 2010.1, each periodic check can have a different periodicity
# therefore, for the enabled tests we define their periodicity to 'daily'
# to have the same behavior as on previous versions
- sed -i -e 's/\(CHECK_.*\)=yes/\1=daily/g' /etc/security/msec/security.conf
+ CHECK_STRING=""
+ for z in PERMS USER_FILES SUID_ROOT SUID_MD5 SGID WRITABLE UNOWNED PROMISC OPEN_PORT FIREWALL PASSWD SHADOW CHKROOTKIT RPM_PACKAGES RPM_INTEGRITY SHOSTS USERS GROUPS; do
+ if [ -z "$CHECK_STRING" ]; then
+ CHECK_STRING=$z
+ else
+ CHECK_STRING="$CHECK_STRING\|$z"
+ fi
+ done
+ sed -i -e "s/\(CHECK_\($CHECK_STRING\)\)=yes/\1=daily/g" /etc/security/msec/security.conf
# removing duplicated entries
TEMPFILE=`mktemp /etc/security/msec/upgrade.XXXXXX`
cat /etc/security/msec/security.conf | sort | uniq > $TEMPFILE 2>/dev/null && mv -f $TEMPFILE /etc/security/msec/security.conf