aboutsummaryrefslogtreecommitdiffstats
path: root/cron-sh/functions.sh
diff options
context:
space:
mode:
authorEugeni Dodonov <eugeni@mandriva.org>2009-08-18 12:27:02 +0000
committerEugeni Dodonov <eugeni@mandriva.org>2009-08-18 12:27:02 +0000
commitdd6e50823be7ad619eb750603b780331d4ec6e99 (patch)
treeac89d70ee211cfe06ee34c9e2796cd299d0753ee /cron-sh/functions.sh
parent8f89bcda5c9be224c8db3f57cac15b06ad27141e (diff)
downloadmsec-dd6e50823be7ad619eb750603b780331d4ec6e99.tar
msec-dd6e50823be7ad619eb750603b780331d4ec6e99.tar.gz
msec-dd6e50823be7ad619eb750603b780331d4ec6e99.tar.bz2
msec-dd6e50823be7ad619eb750603b780331d4ec6e99.tar.xz
msec-dd6e50823be7ad619eb750603b780331d4ec6e99.zip
Give proper permissions to diff files.
Diffstat (limited to 'cron-sh/functions.sh')
-rw-r--r--cron-sh/functions.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/cron-sh/functions.sh b/cron-sh/functions.sh
index 43d0820..40fbcab 100644
--- a/cron-sh/functions.sh
+++ b/cron-sh/functions.sh
@@ -42,6 +42,8 @@ Diffcheck() {
YESTERDAY="$2"
DAY_DIFF="$3"
MESSAGE="$4"
+ # give the proper permission to files
+ msecperms -q -e "$TODAY" "$YESTERDAY"
if [[ -f ${YESTERDAY} ]]; then
if ! diff -u ${YESTERDAY} ${TODAY} > ${DAY_DIFF}; then
printf "\nSecurity Warning: change in $MESSAGE found :\n" >> ${DIFF}
@@ -52,6 +54,7 @@ Diffcheck() {
printf "\t\t- Removed $MESSAGE : ${file}\n"
done >> ${DIFF}
fi
+ msecperms -q -e "$DAY_DIFF"
fi
}