diff options
author | Francesco Colista <francesco.colista@gmail.com> | 2013-07-08 11:33:58 +0000 |
---|---|---|
committer | Francesco Colista <francesco.colista@gmail.com> | 2013-07-08 11:34:11 +0000 |
commit | 411a2782aaa756b3a8f3988763ac592cff1257b3 (patch) | |
tree | f3506a151a9b2e71ed9417f298e40f11e8d66418 /main/arpwatch/09_all_arpwatch-2.1a15-quite-mail.patch | |
parent | 0852cf7df3027cc1addd921d31c0b032983196e0 (diff) | |
download | aports-411a2782aaa756b3a8f3988763ac592cff1257b3.tar.bz2 aports-411a2782aaa756b3a8f3988763ac592cff1257b3.tar.xz |
main/arpwatch: added several patches for improving options and security
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.patch | 90 |
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 0000000000..ce5c4b244b --- /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; |