From 7ed24015281a826cb5d6ebff7c8b1d13d8be4e22 Mon Sep 17 00:00:00 2001 From: Eugeni Dodonov Date: Tue, 2 Mar 2010 23:10:17 +0000 Subject: using exit instead of return when checking if we are run from scripts --- cron-sh/scripts/01_files.sh | 2 +- cron-sh/scripts/02_network.sh | 2 +- cron-sh/scripts/03_rpm.sh | 2 +- cron-sh/scripts/04_rootkit.sh | 2 +- cron-sh/scripts/05_access.sh | 2 +- cron-sh/scripts/06_sectool.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'cron-sh/scripts') diff --git a/cron-sh/scripts/01_files.sh b/cron-sh/scripts/01_files.sh index 247465f..6aa7add 100755 --- a/cron-sh/scripts/01_files.sh +++ b/cron-sh/scripts/01_files.sh @@ -6,7 +6,7 @@ if [ -z "$MSEC_TMP" -o -z "$INFOS" -o -z "$SECURITY" -o -z "$DIFF" -o -z "$SECUR # 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." - return 1 + exit 1 fi export SUID_ROOT_TODAY="/var/log/security/suid_root.${CURRENT_CHECK_TYPE}.today" diff --git a/cron-sh/scripts/02_network.sh b/cron-sh/scripts/02_network.sh index f0519ae..f790dee 100755 --- a/cron-sh/scripts/02_network.sh +++ b/cron-sh/scripts/02_network.sh @@ -6,7 +6,7 @@ if [ -z "$MSEC_TMP" -o -z "$INFOS" -o -z "$SECURITY" -o -z "$DIFF" -o -z "$SECUR # 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." - return 1 + exit 1 fi export OPEN_PORT_TODAY="/var/log/security/open_port.${CURRENT_CHECK_TYPE}.today" diff --git a/cron-sh/scripts/03_rpm.sh b/cron-sh/scripts/03_rpm.sh index f303ee2..cf84d6e 100755 --- a/cron-sh/scripts/03_rpm.sh +++ b/cron-sh/scripts/03_rpm.sh @@ -6,7 +6,7 @@ if [ -z "$MSEC_TMP" -o -z "$INFOS" -o -z "$SECURITY" -o -z "$DIFF" -o -z "$SECUR # 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." - return 1 + exit 1 fi export RPM_VA_TODAY="/var/log/security/rpm-va.${CURRENT_CHECK_TYPE}.today" diff --git a/cron-sh/scripts/04_rootkit.sh b/cron-sh/scripts/04_rootkit.sh index aca690d..1d0c041 100755 --- a/cron-sh/scripts/04_rootkit.sh +++ b/cron-sh/scripts/04_rootkit.sh @@ -6,7 +6,7 @@ if [ -z "$MSEC_TMP" -o -z "$INFOS" -o -z "$SECURITY" -o -z "$DIFF" -o -z "$SECUR # 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." - return 1 + exit 1 fi export CHKROOTKIT_TODAY="/var/log/security/chkrootkit.${CURRENT_CHECK_TYPE}.today" diff --git a/cron-sh/scripts/05_access.sh b/cron-sh/scripts/05_access.sh index 2af0d2d..2c77b06 100755 --- a/cron-sh/scripts/05_access.sh +++ b/cron-sh/scripts/05_access.sh @@ -6,7 +6,7 @@ if [ -z "$MSEC_TMP" -o -z "$INFOS" -o -z "$SECURITY" -o -z "$DIFF" -o -z "$SECUR # 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." - return 1 + exit 1 fi # check for changes in users diff --git a/cron-sh/scripts/06_sectool.sh b/cron-sh/scripts/06_sectool.sh index ef9fe6d..759e330 100755 --- a/cron-sh/scripts/06_sectool.sh +++ b/cron-sh/scripts/06_sectool.sh @@ -6,7 +6,7 @@ if [ -z "$MSEC_TMP" -o -z "$INFOS" -o -z "$SECURITY" -o -z "$DIFF" -o -z "$SECUR # 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." - return 1 + exit 1 fi # check for changes in users -- cgit v1.2.1