diff options
author | Eugeni Dodonov <eugeni@mandriva.org> | 2009-08-13 13:19:31 +0000 |
---|---|---|
committer | Eugeni Dodonov <eugeni@mandriva.org> | 2009-08-13 13:19:31 +0000 |
commit | 4b0f4e4bdcbf92d77ea92012f1fe84b9539b9c6f (patch) | |
tree | 7de1e5ac9da6e4be11b4a34f9508f8792258f99f /cron-sh | |
parent | b5ce6145ada8bbd883caf96b4c53a5de57c16f1b (diff) | |
download | msec-4b0f4e4bdcbf92d77ea92012f1fe84b9539b9c6f.tar msec-4b0f4e4bdcbf92d77ea92012f1fe84b9539b9c6f.tar.gz msec-4b0f4e4bdcbf92d77ea92012f1fe84b9539b9c6f.tar.bz2 msec-4b0f4e4bdcbf92d77ea92012f1fe84b9539b9c6f.tar.xz msec-4b0f4e4bdcbf92d77ea92012f1fe84b9539b9c6f.zip |
Properly log promisc messages.
Diffstat (limited to 'cron-sh')
-rwxr-xr-x | cron-sh/promisc_check.sh | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/cron-sh/promisc_check.sh b/cron-sh/promisc_check.sh index 99036a4..62d61e2 100755 --- a/cron-sh/promisc_check.sh +++ b/cron-sh/promisc_check.sh @@ -5,10 +5,14 @@ LogPromisc() { date=`date` - Syslog "Security warning : $1 is in promiscuous mode." - Syslog " A sniffer is probably running on your system." - Ttylog "\\033[1;31mSecurity warning : $1 is in promiscuous mode.\\033[0;39m" - Ttylog "\\033[1;31mA sniffer is probably running on your system.\\033[0;39m" + tempfile=`mktemp /tmp/promisc.XXXXXX` + echo "Security warning : $1 is in promiscuous mode." > $tempfile + echo " A sniffer is probably running on your system." >> $tempfile + Syslog $tempfile + echo "\\033[1;31mSecurity warning : $1 is in promiscuous mode.\\033[0;39m" > $tempfile + echo "\\033[1;31mA sniffer is probably running on your system.\\033[0;39m" >> $tempfile + Ttylog $tempfile + rm -f $tempfile # are we being run from security.sh script? if [ ! -z "$SECURITY" ]; then |