aboutsummaryrefslogtreecommitdiffstats
path: root/cron-sh/scripts
diff options
context:
space:
mode:
authorEugeni Dodonov <eugeni@mandriva.org>2009-08-30 23:48:40 +0000
committerEugeni Dodonov <eugeni@mandriva.org>2009-08-30 23:48:40 +0000
commit3f183f5f0da46e0b9eebc9e149fd3d36f8f1d839 (patch)
tree38ef8f608c938ef70223c5b786b21c7aa00501aa /cron-sh/scripts
parent99e7d49a44b2968bea73d5062638d2225a0de063 (diff)
downloadmsec-3f183f5f0da46e0b9eebc9e149fd3d36f8f1d839.tar
msec-3f183f5f0da46e0b9eebc9e149fd3d36f8f1d839.tar.gz
msec-3f183f5f0da46e0b9eebc9e149fd3d36f8f1d839.tar.bz2
msec-3f183f5f0da46e0b9eebc9e149fd3d36f8f1d839.tar.xz
msec-3f183f5f0da46e0b9eebc9e149fd3d36f8f1d839.zip
Support enforcing file permissions in periodic msec runs
Diffstat (limited to 'cron-sh/scripts')
-rwxr-xr-xcron-sh/scripts/01_files.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/cron-sh/scripts/01_files.sh b/cron-sh/scripts/01_files.sh
index a38a874..b9940ed 100755
--- a/cron-sh/scripts/01_files.sh
+++ b/cron-sh/scripts/01_files.sh
@@ -237,11 +237,16 @@ fi
fi # End of CHECK_USER_FILES
# now check default permissions
-if [[ ${CHECK_PERMS} == yes ]]; then
+if [[ ${CHECK_PERMS} == yes || ${CHECK_PERMS} == enforce ]]; then
+ if [[ ${CHECK_PERMS} == enforce ]]; then
+ MSECPERMS_PARAMS="-e"
+ else
+ MSECPERMS_PARAMS=""
+ fi
# running msec_perms
- /usr/sbin/msecperms > ${MSEC_TMP} 2>&1
+ /usr/sbin/msecperms $MSECPERMS_PARAMS > ${MSEC_TMP} 2>&1
if [[ -s ${MSEC_TMP} ]]; then
- printf "\nPermissions changes on system files:\n" >> ${SECURITY}
+ printf "\nPermissions changes on files watched by msec:\n" >> ${SECURITY}
cat ${MSEC_TMP} | sed -e 's/WARNING: //g' >> ${SECURITY}
fi
fi