aboutsummaryrefslogtreecommitdiffstats
path: root/cron-sh
diff options
context:
space:
mode:
authorYoann Vandoorselaere <yoann@mandriva.com>1999-12-09 10:20:55 +0000
committerYoann Vandoorselaere <yoann@mandriva.com>1999-12-09 10:20:55 +0000
commit588989f7a9faeda91f9b9bfdebf67fab5ba3f422 (patch)
tree4ff8b24c26721e73fb930b12998996a16b5a0edc /cron-sh
parent8cf02ef57b2d33efa26dd8d03e74548c81ce2725 (diff)
downloadmsec-588989f7a9faeda91f9b9bfdebf67fab5ba3f422.tar
msec-588989f7a9faeda91f9b9bfdebf67fab5ba3f422.tar.gz
msec-588989f7a9faeda91f9b9bfdebf67fab5ba3f422.tar.bz2
msec-588989f7a9faeda91f9b9bfdebf67fab5ba3f422.tar.xz
msec-588989f7a9faeda91f9b9bfdebf67fab5ba3f422.zip
*** empty log message ***
Diffstat (limited to 'cron-sh')
-rwxr-xr-xcron-sh/promisc_check.sh22
1 files changed, 17 insertions, 5 deletions
diff --git a/cron-sh/promisc_check.sh b/cron-sh/promisc_check.sh
index 10110b4..a4186c7 100755
--- a/cron-sh/promisc_check.sh
+++ b/cron-sh/promisc_check.sh
@@ -7,6 +7,11 @@ else
exit 1
fi
+if tail /var/log/security.log | grep -q "promiscuous"; then
+ # Dont flood with warning.
+ exit 0
+fi
+
Syslog() {
if [ "${SYSLOG_WARN}" == "yes" ]; then
/sbin/initlog --string="${1}"
@@ -28,11 +33,12 @@ PROMISC_CHECK="/usr/bin/promisc_check -q"
#
LogPromisc() {
- 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"
- echo "Security warning : $1 is in promiscuous mode." >> /var/log/security.log
+ 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"
+ echo -e "\n${date} Security warning : $1 is in promiscuous mode." >> /var/log/security.log
echo " A sniffer is probably running on your system." >> /var/log/security.log
}
@@ -57,3 +63,9 @@ done
+
+
+
+
+
+