summaryrefslogtreecommitdiffstats
path: root/main/arpwatch/09_all_arpwatch-2.1a15-quite-mail.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/arpwatch/09_all_arpwatch-2.1a15-quite-mail.patch')
-rw-r--r--main/arpwatch/09_all_arpwatch-2.1a15-quite-mail.patch90
1 files changed, 90 insertions, 0 deletions
diff --git a/main/arpwatch/09_all_arpwatch-2.1a15-quite-mail.patch b/main/arpwatch/09_all_arpwatch-2.1a15-quite-mail.patch
new file mode 100644
index 000000000..ce5c4b244
--- /dev/null
+++ b/main/arpwatch/09_all_arpwatch-2.1a15-quite-mail.patch
@@ -0,0 +1,90 @@
+diff -Naru arpwatch-2.1a15.orig/arpwatch.8 arpwatch-2.1a15/arpwatch.8
+--- arpwatch-2.1a15.orig/arpwatch.8 2006-09-23 22:16:05.000000000 +0400
++++ arpwatch-2.1a15/arpwatch.8 2006-09-23 22:17:15.000000000 +0400
+@@ -87,6 +87,11 @@
+ .B -R
+ .I seconds
+ ]
++.br
++.ti +8
++[
++.B -Q
++]
+ .ad
+ .SH DESCRIPTION
+ .B Arpwatch
+@@ -197,6 +202,10 @@
+ .B -u
+ flags are used. (This feature comes from Debian).
+ .LP
++The
++.B -Q
++flags prevents arpwatch from sending reports by mail. (This feature comes from Debian).
++.LP
+ Note that an empty
+ .I arp.dat
+ file must be created before the first time you run
+diff -Naru arpwatch-2.1a15.orig/arpwatch.c arpwatch-2.1a15/arpwatch.c
+--- arpwatch-2.1a15.orig/arpwatch.c 2006-09-23 22:16:05.000000000 +0400
++++ arpwatch-2.1a15/arpwatch.c 2006-09-23 22:18:10.000000000 +0400
+@@ -188,6 +188,7 @@
+ "p"
+ "a"
+ "u:"
++ "Q"
+ ;
+
+ if (argv[0] == NULL)
+@@ -258,6 +259,11 @@
+ username = optarg;
+ break;
+
++ case 'Q':
++ ++quiet;
++ break;
++
++
+ default:
+ usage();
+ }
+@@ -823,6 +829,7 @@
+ "[-p] "
+ "[-a] "
+ "[-u username] "
++ "[-Q ] "
+ "\n"
+ ;
+
+diff -Naru arpwatch-2.1a15.orig/report.c arpwatch-2.1a15/report.c
+--- arpwatch-2.1a15.orig/report.c 2006-09-23 22:13:55.000000000 +0400
++++ arpwatch-2.1a15/report.c 2006-09-23 22:17:15.000000000 +0400
+@@ -274,6 +274,10 @@
+ /* Syslog this event too */
+ dosyslog(LOG_NOTICE, title, a, e1, e2, interface);
+
++ /* return if watcher is an empty string */
++ if ( quiet )
++ return;
++
+ /* Update child depth */
+ ++cdepth;
+
+diff -Naru arpwatch-2.1a15.orig/util.c arpwatch-2.1a15/util.c
+--- arpwatch-2.1a15.orig/util.c 2006-09-23 22:13:55.000000000 +0400
++++ arpwatch-2.1a15/util.c 2006-09-23 22:17:15.000000000 +0400
+@@ -65,6 +65,7 @@
+ int nopromisc = 0; /* don't activate promisc mode by default */
+ int allsubnets = 0; /* watch all attached subnets */
+ char *mailaddress = WATCHER;
++int quiet = 0; /* send mail by default */
+
+ /* syslog() helper routine */
+ void
+diff -Naru arpwatch-2.1a15.orig/util.h arpwatch-2.1a15/util.h
+--- arpwatch-2.1a15.orig/util.h 2006-09-23 22:13:55.000000000 +0400
++++ arpwatch-2.1a15/util.h 2006-09-23 22:17:15.000000000 +0400
+@@ -20,3 +20,4 @@
+ extern int nopromisc;
+ extern int allsubnets;
+ extern char *mailaddress;
++extern int quiet;