From 808c8c9ee57499a1f4a4af480df3eddce1725f9f Mon Sep 17 00:00:00 2001 From: Eugeni Dodonov Date: Wed, 10 Feb 2010 14:32:29 +0000 Subject: Properly log execution results for different check periods --- cron-sh/scripts/05_access.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'cron-sh/scripts/05_access.sh') diff --git a/cron-sh/scripts/05_access.sh b/cron-sh/scripts/05_access.sh index 4fe5d82..f256b7d 100755 --- a/cron-sh/scripts/05_access.sh +++ b/cron-sh/scripts/05_access.sh @@ -2,7 +2,7 @@ # msec: system access # check if we are run from main script -if [ -z "$MSEC_TMP" -o -z "$INFOS" -o -z "$SECURITY" -o -z "$DIFF" -o -z "$SECURITY_LOG" ]; then +if [ -z "$MSEC_TMP" -o -z "$INFOS" -o -z "$SECURITY" -o -z "$DIFF" -o -z "$SECURITY_LOG" -o -z "${CURRENT_CHECK_TYPE}" ]; then # variables are set in security.sh and propagated to the subscripts echo "Error: this check should be run by the main msec security check!" echo " do not run it directly unless you know what you are doing." @@ -10,9 +10,9 @@ if [ -z "$MSEC_TMP" -o -z "$INFOS" -o -z "$SECURITY" -o -z "$DIFF" -o -z "$SECUR fi # check for changes in users -USERS_LIST_TODAY="/var/log/security/users_list.today" -USERS_LIST_YESTERDAY="/var/log/security/users_list.yesterday" -USERS_LIST_DIFF="/var/log/security/users_list.diff" +USERS_LIST_TODAY="/var/log/security/users_list.${CURRENT_CHECK_TYPE}.today" +USERS_LIST_YESTERDAY="/var/log/security/users_list.${CURRENT_CHECK_TYPE}.yesterday" +USERS_LIST_DIFF="/var/log/security/users_list.${CURRENT_CHECK_TYPE}.diff" if [[ -f ${USERS_LIST_TODAY} ]]; then mv ${USERS_LIST_TODAY} ${USERS_LIST_YESTERDAY}; @@ -27,9 +27,9 @@ if check_is_enabled "${CHECK_USERS}" ; then fi # check for changes in groups -GROUPS_LIST_TODAY="/var/log/security/groups_list.today" -GROUPS_LIST_YESTERDAY="/var/log/security/groups_list.yesterday" -GROUPS_LIST_DIFF="/var/log/security/groups_list.diff" +GROUPS_LIST_TODAY="/var/log/security/groups_list.${CURRENT_CHECK_TYPE}.today" +GROUPS_LIST_YESTERDAY="/var/log/security/groups_list.${CURRENT_CHECK_TYPE}.yesterday" +GROUPS_LIST_DIFF="/var/log/security/groups_list.${CURRENT_CHECK_TYPE}.diff" if [[ -f ${GROUPS_LIST_TODAY} ]]; then mv ${GROUPS_LIST_TODAY} ${GROUPS_LIST_YESTERDAY}; -- cgit v1.2.1