aboutsummaryrefslogtreecommitdiffstats
path: root/cron-sh/diff_check.sh
diff options
context:
space:
mode:
Diffstat (limited to 'cron-sh/diff_check.sh')
-rwxr-xr-xcron-sh/diff_check.sh36
1 files changed, 18 insertions, 18 deletions
diff --git a/cron-sh/diff_check.sh b/cron-sh/diff_check.sh
index 8e14c73..6400b70 100755
--- a/cron-sh/diff_check.sh
+++ b/cron-sh/diff_check.sh
@@ -28,10 +28,10 @@ if [[ ${CHECK_SUID_ROOT} == yes ]]; then
if ! diff -u ${SUID_ROOT_YESTERDAY} ${SUID_ROOT_TODAY} > ${SUID_ROOT_DIFF}; then
printf "\nSecurity Warning: Change in Suid Root files found :\n" >> ${TMP}
grep '^+' ${SUID_ROOT_DIFF} | grep -vw "^+++ " | sed 's|^.||' | while read file; do
- printf "\t\t- Added suid root files : ${file}\n"
+ printf "\t\t- Newly added suid root file : ${file}\n"
done >> ${TMP}
grep '^-' ${SUID_ROOT_DIFF} | grep -vw "^--- " | sed 's|^.||' | while read file; do
- printf "\t\t- Removed suid root files : ${file}\n"
+ printf "\t\t- No more present suid root file : ${file}\n"
done >> ${TMP}
fi
fi
@@ -43,12 +43,12 @@ if [[ ${CHECK_SUID_GROUP} == yes ]]; then
if [[ -f ${SUID_GROUP_YESTERDAY} ]]; then
if ! diff -u ${SUID_GROUP_YESTERDAY} ${SUID_GROUP_TODAY} > ${SUID_GROUP_DIFF}; then
- printf "\nSecurity Warning: Changes in Suid Group files found :\n" >> ${TMP}
+ printf "\nSecurity Warning: Changes in Sgid files found :\n" >> ${TMP}
grep '^+' ${SUID_GROUP_DIFF} | grep -vw "^+++ " | sed 's|^.||' | while read file; do
- printf "\t\t- Added suid group files : ${file}\n"
+ printf "\t\t- Newly added sgid file : ${file}\n"
done >> ${TMP}
grep '^-' ${SUID_GROUP_DIFF} | grep -vw "^--- " | sed 's|^.||' | while read file; do
- printf "\t\t- Removed suid group files : ${file}\n"
+ printf "\t\t- No more present sgid file : ${file}\n"
done >> ${TMP}
fi
fi
@@ -63,10 +63,10 @@ if [[ ${CHECK_WRITEABLE} == yes ]]; then
if [ -s ${WRITEABLE_DIFF} ]; then
printf "\nSecurity Warning: Change in World Writeable Files found :\n" >> ${TMP}
grep '^+' ${WRITEABLE_DIFF} | grep -vw "^+++ " | sed 's|^.||' | while read file; do
- printf "\t\t- Added writables files : ${file}\n"
+ printf "\t\t- Newly added writables files : ${file}\n"
done >> ${TMP}
grep '^-' ${WRITEABLE_DIFF} | grep -vw "^--- " | sed 's|^.||' | while read file; do
- printf "\t\t- Removed writables files : ${file}\n"
+ printf "\t\t- No more present writables file : ${file}\n"
done >> ${TMP}
fi
fi
@@ -81,10 +81,10 @@ if [[ ${CHECK_UNOWNED} == yes ]]; then
if [ -s ${UNOWNED_USER_DIFF} ]; then
printf "\nSecurity Warning: the following files aren't owned by an user :\n" >> ${TMP}
grep '^+' ${UNOWNED_USER_DIFF} | grep -vw "^+++ " | sed 's|^.||' | while read file; do
- printf "\t\t- Added un-owned files : ${file}\n"
+ printf "\t\t- Newly added un-owned file : ${file}\n"
done >> ${TMP}
grep '^-' ${UNOWNED_USER_DIFF} | grep -vw "^--- " | sed 's|^.||' | while read file; do
- printf "\t\t- Removed un-owned files : ${file}\n"
+ printf "\t\t- No more present un-owned file : ${file}\n"
done >> ${TMP}
fi
fi
@@ -94,10 +94,10 @@ if [[ ${CHECK_UNOWNED} == yes ]]; then
if [ -s ${UNOWNED_GROUP_DIFF} ]; then
printf "\nSecurity Warning: the following files aren't owned by a group :\n" >> ${TMP}
grep '^+' ${UNOWNED_GROUP_DIFF} | grep -vw "^+++ " | sed 's|^.||' | while read file; do
- printf "\t\t- Added un-owned files : ${file}\n"
+ printf "\t\t- Newly added un-owned file : ${file}\n"
done >> ${TMP}
grep '^-' ${UNOWNED_GROUP_DIFF} | grep -vw "^--- " | sed 's|^.||' | while read file; do
- printf "\t\t- Removed un-owned files : ${file}\n"
+ printf "\t\t- No more present un-owned file : ${file}\n"
done >> ${TMP}
fi
fi
@@ -151,10 +151,10 @@ if [[ ${RPM_CHECK} == yes ]]; then
if [ -s ${RPM_QA_DIFF} ]; then
printf "\nSecurity Warning: These packages have changed on the system :\n" >> ${TMP}
grep '^+' ${RPM_QA_DIFF} | grep -vw "^+++ " | sed 's|^.||' | while read file; do
- printf "\t\t- added package : ${file}\n"
+ printf "\t\t- Newly installed package : ${file}\n"
done >> ${TMP}
grep '^-' ${RPM_QA_DIFF} | grep -vw "^--- " | sed 's|^.||' | while read file; do
- printf "\t\t- removed package : ${file}\n"
+ printf "\t\t- No more present package : ${file}\n"
done >> ${TMP}
fi
fi
@@ -163,10 +163,10 @@ if [[ ${RPM_CHECK} == yes ]]; then
if [ -s ${RPM_VA_DIFF} ]; then
printf "\nSecurity Warning: These files belonging to packages have changed of status on the system :\n" >> ${TMP}
grep '^+' ${RPM_VA_DIFF} | grep -vw "^+++ " | sed 's|^.||' | while read file; do
- printf "\t\t- newly modified : ${file}\n"
+ printf "\t\t- Newly modified : ${file}\n"
done >> ${TMP}
grep '^-' ${RPM_VA_DIFF} | grep -vw "^--- " | sed 's|^.||' | while read file; do
- printf "\t\t- no more modified : ${file}\n"
+ printf "\t\t- No more modified : ${file}\n"
done >> ${TMP}
fi
fi
@@ -175,10 +175,10 @@ if [[ ${RPM_CHECK} == yes ]]; then
if [ -s ${RPM_VA_CONFIG_DIFF} ]; then
printf "\nSecurity Warning: These config files belonging to packages have changed of status on the system :\n" >> ${TMP}
grep '^+' ${RPM_VA_CONFIG_DIFF} | grep -vw "^+++ " | sed 's|^.||' | while read file; do
- printf "\t\t- newly modified : ${file}\n"
+ printf "\t\t- Newly modified : ${file}\n"
done >> ${TMP}
grep '^-' ${RPM_VA_CONFIG_DIFF} | grep -vw "^--- " | sed 's|^.||' | while read file; do
- printf "\t\t- no more modified : ${file}\n"
+ printf "\t\t- No more modified : ${file}\n"
done >> ${TMP}
fi
fi
@@ -200,7 +200,7 @@ Nothing has changed since the last run.
EOF
fi
-Maillog "*** Diff Check on ${hostname}, ${date} ***" "${TMP}"
+Maillog "[msec] *** Diff Check on ${hostname}, ${date} ***" "${TMP}"
if [[ -f ${TMP} ]]; then
rm -f ${TMP}