From 6561120bae921f51e3845f13ac4de0425b6fd719 Mon Sep 17 00:00:00 2001 From: Eugeni Dodonov Date: Sat, 27 Jun 2009 17:10:31 +0000 Subject: Properly handle promisc checks (#51903) --- cron-sh/promisc_check.sh | 6 +++--- cron-sh/scripts/02_network.sh | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'cron-sh') diff --git a/cron-sh/promisc_check.sh b/cron-sh/promisc_check.sh index 53cc168..99036a4 100755 --- a/cron-sh/promisc_check.sh +++ b/cron-sh/promisc_check.sh @@ -21,18 +21,18 @@ if [[ -f /etc/security/msec/security.conf ]]; then . /etc/security/msec/security.conf else echo "/etc/security/msec/security.conf don't exist." - return 1 + exit 1 fi if tail /var/log/security.log | grep -q "promiscuous"; then # Dont flood with warning. - return 0 + exit 0 fi # Check if a network interface is in promiscuous mode... if [[ ${CHECK_PROMISC} == no ]]; then - return 0; + exit 0; fi for INTERFACE in `/sbin/ip link list | grep PROMISC | cut -f 2 -d ':';/usr/bin/promisc_check -q`; do diff --git a/cron-sh/scripts/02_network.sh b/cron-sh/scripts/02_network.sh index 95228c2..8e2286c 100755 --- a/cron-sh/scripts/02_network.sh +++ b/cron-sh/scripts/02_network.sh @@ -52,6 +52,6 @@ fi ### Check if network is in promisc mode if [[ ${CHECK_PROMISC} == yes ]]; then - # check_promisc handles this - . /usr/share/msec/promisc_check.sh + export SECURITY + /usr/share/msec/promisc_check.sh fi -- cgit v1.2.1