diff options
author | Eugeni Dodonov <eugeni@mandriva.org> | 2009-08-30 23:48:40 +0000 |
---|---|---|
committer | Eugeni Dodonov <eugeni@mandriva.org> | 2009-08-30 23:48:40 +0000 |
commit | 3f183f5f0da46e0b9eebc9e149fd3d36f8f1d839 (patch) | |
tree | 38ef8f608c938ef70223c5b786b21c7aa00501aa /cron-sh | |
parent | 99e7d49a44b2968bea73d5062638d2225a0de063 (diff) | |
download | msec-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')
-rwxr-xr-x | cron-sh/scripts/01_files.sh | 11 |
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 |