diff options
author | Eugeni Dodonov <eugeni@mandriva.org> | 2009-06-27 17:10:31 +0000 |
---|---|---|
committer | Eugeni Dodonov <eugeni@mandriva.org> | 2009-06-27 17:10:31 +0000 |
commit | 6561120bae921f51e3845f13ac4de0425b6fd719 (patch) | |
tree | 49b84711cd3298903a1a3271a25d9364cf313f19 | |
parent | 2bda15c94866735d88e19cea809209f62eb114c5 (diff) | |
download | msec-6561120bae921f51e3845f13ac4de0425b6fd719.tar msec-6561120bae921f51e3845f13ac4de0425b6fd719.tar.gz msec-6561120bae921f51e3845f13ac4de0425b6fd719.tar.bz2 msec-6561120bae921f51e3845f13ac4de0425b6fd719.tar.xz msec-6561120bae921f51e3845f13ac4de0425b6fd719.zip |
Properly handle promisc checks (#51903)
-rwxr-xr-x | cron-sh/promisc_check.sh | 6 | ||||
-rwxr-xr-x | cron-sh/scripts/02_network.sh | 4 |
2 files changed, 5 insertions, 5 deletions
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 |