FreeBSD Bugzilla – Attachment 209581 Details for
Bug 242346
net-mgmt/arpwatch: Update to 3.0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
revised patch
patch2.txt (text/plain), 23.75 KB, created by
Craig Leres
on 2019-12-01 23:07:53 UTC
(
hide
)
Description:
revised patch
Filename:
MIME Type:
Creator:
Craig Leres
Created:
2019-12-01 23:07:53 UTC
Size:
23.75 KB
patch
obsolete
>Index: net-mgmt/arpwatch/Makefile >=================================================================== >--- net-mgmt/arpwatch/Makefile (revision 518766) >+++ net-mgmt/arpwatch/Makefile (working copy) >@@ -2,11 +2,10 @@ > # $FreeBSD$ > > PORTNAME= arpwatch >-DISTVERSION= 2.1a15 >-PORTREVISION= 10 >+PORTVERSION= 3.0 > CATEGORIES= net-mgmt >-MASTER_SITES= ftp://ftp.ee.lbl.gov/ \ >- GENTOO >+MASTER_SITES= https://ee.lbl.gov/downloads/arpwatch/ \ >+ LOCAL/leres/arpwatch > > MAINTAINER= pi@FreeBSD.org > COMMENT= Monitor arp & rarp requests >@@ -13,13 +12,32 @@ > > LICENSE= BSD3CLAUSE > >+BUILD_DEPENDS= ${LOCALBASE}/include/pcap.h:net/libpcap >+RUN_DEPENDS= ${LOCALBASE}/include/pcap.h:net/libpcap >+ >+USES= python:run >+ > GNU_CONFIGURE= yes >-CONFIGURE_ARGS= --quiet >-INSTALL_TARGET= install install-man > >-SUB_FILES= pkg-message >-USE_RC_SUBR= arpwatch >+SUB_FILES= pkg-message > >+OPTIONS_DEFINE= DEBUG ETHERCODES ZEROPAD >+OPTIONS_DEFAULT=ETHERCODES ZEROPAD >+OPTIONS_SUB= yes >+ >+ETHERCODES_DESC=install ethercodes.dat >+ZEROPAD_DESC= zero pad displayed ethernet addresses by default >+ >+.include <bsd.port.options.mk> >+ >+.if ${PORT_OPTIONS:MDEBUG} >+CONFIGURE_ARGS+= --disable-optimization >+.endif >+ >+.if ${PORT_OPTIONS:MZEROPAD} >+CONFIGURE_ARGS+= --enable-zeropad >+.endif >+ > .ifdef ARPDIR > MAKE_ARGS= ARPDIR=${ARPDIR} > .endif >@@ -26,10 +44,18 @@ > > post-install: > ${MKDIR} ${STAGEDIR}${PREFIX}/arpwatch >- for files in ethercodes.dat d.awk duplicates.awk euppertolower.awk e.awk p.awk; do \ >- ${INSTALL_DATA} ${WRKSRC}/$$files ${STAGEDIR}${PREFIX}/arpwatch; \ >- done >+.for F in ethercodes.dat d.awk duplicates.awk euppertolower.awk e.awk p.awk >+ ${INSTALL_DATA} ${WRKSRC}/${F} ${STAGEDIR}${PREFIX}/arpwatch >+.endfor > ${INSTALL_SCRIPT} ${WRKSRC}/arp2ethers ${STAGEDIR}${PREFIX}/arpwatch >- ${INSTALL_SCRIPT} ${WRKSRC}/massagevendor ${STAGEDIR}${PREFIX}/arpwatch >+ ${INSTALL_SCRIPT} ${WRKSRC}/massagevendor.py \ >+ ${STAGEDIR}${PREFIX}/arpwatch/massagevendor >+.if ${PORT_OPTIONS:METHERCODES} >+ ${INSTALL_DATA} ${WRKSRC}/ethercodes.dat ${STAGEDIR}${PREFIX}/arpwatch >+.endif > >+post-configure: >+ ${REINPLACE_CMD} -e "/^LIBS *=/s,-lpcap,${LOCALBASE}/lib/libpcap.so.1," \ >+ ${WRKSRC}/Makefile >+ > .include <bsd.port.mk> >Index: net-mgmt/arpwatch/distinfo >=================================================================== >--- net-mgmt/arpwatch/distinfo (revision 518766) >+++ net-mgmt/arpwatch/distinfo (working copy) >@@ -1,2 +1,3 @@ >-SHA256 (arpwatch-2.1a15.tar.gz) = c1df9737e208a96a61fa92ddad83f4b4d9be66f8992f3c917e9edf4b05ff5898 >-SIZE (arpwatch-2.1a15.tar.gz) = 202729 >+TIMESTAMP = 1575239752 >+SHA256 (arpwatch-3.0.tar.gz) = 82e137e104aca8b1280f5cca0ebe61b978f10eadcbb4c4802c181522ad02b25b >+SIZE (arpwatch-3.0.tar.gz) = 407879 >Index: net-mgmt/arpwatch/files/arpwatch.in >=================================================================== >--- net-mgmt/arpwatch/files/arpwatch.in (revision 518766) >+++ net-mgmt/arpwatch/files/arpwatch.in (nonexistent) >@@ -1,80 +0,0 @@ >-#!/bin/sh >-# >-# $FreeBSD$ >-# >- >-# PROVIDE: arpwatch >-# REQUIRE: NETWORKING >- >-# Add the following lines to /etc/rc.conf to enable arpwatch: >-# >-#arpwatch_enable="YES" >-# >-arpwatch_enable=${arpwatch_enable:-"NO"} >-arpwatch_dir=${arpwatch_dir:-"%%PREFIX%%/arpwatch/"} >- >-. /etc/rc.subr >- >-name=arpwatch >-rcvar=arpwatch_enable >-required_dirs=${arpwatch_dir} >- >-load_rc_config ${name} >- >-command="%%PREFIX%%/sbin/${name}" >-start_precmd=${name}_precmd >- >-arpwatch_precmd() { >- case ${arpwatch_interfaces} in >- '') >- echo prcmd >- if [ ! -e "${arpwatch_dir}/arp.dat" ]; then >- if [ -e "${arpwatch_dir}/arp.dat-" ]; then >- cp "${arpwatch_dir}/arp.dat-" "${arpwatch_dir}/arp.dat" >- else >- touch "${arpwatch_dir}/arp.dat" >- fi >- fi >- ;; >- >- *) >- for interface in ${arpwatch_interfaces}; do >- if [ ! -e "${arpwatch_dir}/arp.${interface}.dat" ]; then >- if [ -e "${arpwatch_dir}/arp.${interface}.dat-" ]; then >- cp "${arpwatch_dir}/arp.${interface}.dat-" "${arpwatch_dir}/arp.${interface}.dat" >- else >- touch "${arpwatch_dir}/arp.${interface}.dat" >- fi >- fi >- done >- ;; >- esac >-} >- >-arpwatch_stop() { >- killall arpwatch >-} >- >-case ${arpwatch_interfaces} in >- '') >- echo 'meuh' >- run_rc_command "$1" >- ;; >- >- *) >- case "$1" in >- *start) >- for interface in ${arpwatch_interfaces}; do >- rc_interface=`echo ${interface} | sed 's/\./_/g'` >- eval options=\$arpwatch_${rc_interface}_options >- command_args="-i ${interface} ${options} -f ${arpwatch_dir}/arp.${interface}.dat" >- pidfile="/var/run/arpwatch-${interface}.pid" >- run_rc_command "$1" >- done >- ;; >- *) >- run_rc_command "$1" >- ;; >- esac >- ;; >-esac > >Property changes on: net-mgmt/arpwatch/files/arpwatch.in >___________________________________________________________________ >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:keywords >## -1 +0,0 ## >-FreeBSD=%H >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: net-mgmt/arpwatch/files/patch-Makefile.in >=================================================================== >--- net-mgmt/arpwatch/files/patch-Makefile.in (revision 518766) >+++ net-mgmt/arpwatch/files/patch-Makefile.in (nonexistent) >@@ -1,38 +0,0 @@ >---- Makefile.in.orig 2000-06-15 00:39:55 UTC >-+++ Makefile.in >-@@ -31,7 +31,7 @@ BINDEST = @sbindir@ >- # Pathname of directory to install the man page >- MANDEST = @mandir@ >- # Pathname of directory to install database file >--ARPDIR = $(prefix)/arpwatch >-+ARPDIR ?= $(prefix)/arpwatch >- >- # VPATH >- srcdir = @srcdir@ >-@@ -45,7 +45,7 @@ CC = @CC@ >- PROG = arpwatch >- CCOPT = @V_CCOPT@ >- INCLS = -I. @V_INCLS@ >--DEFS = -DDEBUG @DEFS@ -DARPDIR=\"$(ARPDIR)\" -DPATH_SENDMAIL=\"$(SENDMAIL)\" >-+DEFS = @DEFS@ -DARPDIR=\"$(ARPDIR)\" -DPATH_SENDMAIL=\"$(SENDMAIL)\" >- >- # Standard CFLAGS >- CFLAGS = $(CCOPT) $(DEFS) $(INCLS) >-@@ -110,13 +110,13 @@ zap: zap.o intoa.o >- $(CC) $(CFLAGS) -o $@ zap.o intoa.o -lutil >- >- install: force >-- $(INSTALL) -m 555 -o bin -g bin arpwatch $(DESTDIR)$(BINDEST) >-- $(INSTALL) -m 555 -o bin -g bin arpsnmp $(DESTDIR)$(BINDEST) >-+ $(BSD_INSTALL_PROGRAM) arpwatch $(DESTDIR)$(BINDEST) >-+ $(BSD_INSTALL_PROGRAM) arpsnmp $(DESTDIR)$(BINDEST) >- >- install-man: force >-- $(INSTALL) -m 444 -o bin -g bin $(srcdir)/arpwatch.8 \ >-+ $(BSD_INSTALL_MAN) $(srcdir)/arpwatch.8 \ >- $(DESTDIR)$(MANDEST)/man8 >-- $(INSTALL) -m 444 -o bin -g bin $(srcdir)/arpsnmp.8 \ >-+ $(BSD_INSTALL_MAN) $(srcdir)/arpsnmp.8 \ >- $(DESTDIR)$(MANDEST)/man8 >- >- lint: $(GENSRC) force > >Property changes on: net-mgmt/arpwatch/files/patch-Makefile.in >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: net-mgmt/arpwatch/files/patch-arpsnmp.8 >=================================================================== >--- net-mgmt/arpwatch/files/patch-arpsnmp.8 (revision 518766) >+++ net-mgmt/arpwatch/files/patch-arpsnmp.8 (nonexistent) >@@ -1,34 +0,0 @@ >---- arpsnmp.8.orig 2000-09-17 20:34:48 UTC >-+++ arpsnmp.8 >-@@ -30,6 +30,9 @@ arpsnmp - keep track of ethernet/ip addr >- ] [ >- .B -f >- .I datafile >-+] [ >-+.B -m >-+.I email >- ] >- .I file >- [ >-@@ -55,6 +58,12 @@ flag is used to set the ethernet/ip addr >- The default is >- .IR arp.dat . >- .LP >-+The >-+.B -m >-+flag specifies the address that will receive the emails. >-+The default is >-+.IR root . >-+.LP >- Note that an empty >- .I arp.dat >- file must be created before the first time you run >-@@ -69,7 +78,7 @@ man page for details on the report messa >- .na >- .nh >- .nf >--/usr/operator/arpwatch - default directory >-+/usr/local/arpwatch - default directory >- arp.dat - ethernet/ip address database >- ethercodes.dat - vendor ethernet block list >- .ad > >Property changes on: net-mgmt/arpwatch/files/patch-arpsnmp.8 >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: net-mgmt/arpwatch/files/patch-arpsnmp.c >=================================================================== >--- net-mgmt/arpwatch/files/patch-arpsnmp.c (revision 518766) >+++ net-mgmt/arpwatch/files/patch-arpsnmp.c (nonexistent) >@@ -1,39 +0,0 @@ >---- arpsnmp.c.orig 2004-01-22 22:25:17 UTC >-+++ arpsnmp.c >-@@ -68,6 +68,8 @@ __dead void usage(void) __attribute__((v >- >- char *prog; >- >-+char *Watcher; >-+ >- extern int optind; >- extern int opterr; >- extern char *optarg; >-@@ -90,7 +92,7 @@ main(int argc, char **argv) >- } >- >- opterr = 0; >-- while ((op = getopt(argc, argv, "df:")) != EOF) >-+ while ((op = getopt(argc, argv, "df:m:")) != EOF) >- switch (op) { >- >- case 'd': >-@@ -105,6 +107,10 @@ main(int argc, char **argv) >- arpfile = optarg; >- break; >- >-+ case 'm': >-+ Watcher = optarg; >-+ break; >-+ >- default: >- usage(); >- } >-@@ -185,6 +191,6 @@ usage(void) >- >- (void)fprintf(stderr, "Version %s\n", version); >- (void)fprintf(stderr, >-- "usage: %s [-d] [-f datafile] file [...]\n", prog); >-+ "usage: %s [-d] [-f datafile] [-m email] file [...]\n", prog); >- exit(1); >- } > >Property changes on: net-mgmt/arpwatch/files/patch-arpsnmp.c >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: net-mgmt/arpwatch/files/patch-arpwatch.8 >=================================================================== >--- net-mgmt/arpwatch/files/patch-arpwatch.8 (revision 518766) >+++ net-mgmt/arpwatch/files/patch-arpwatch.8 (nonexistent) >@@ -1,59 +0,0 @@ >---- arpwatch.8.orig 2000-10-08 20:31:28 UTC >-+++ arpwatch.8 >-@@ -27,7 +27,7 @@ arpwatch - keep track of ethernet/ip add >- .na >- .B arpwatch >- [ >--.B -dN >-+.B -dNvz >- ] [ >- .B -f >- .I datafile >-@@ -38,6 +38,9 @@ arpwatch - keep track of ethernet/ip add >- .br >- .ti +8 >- [ >-+.B -m >-+.I email >-+] [ >- .B -n >- .IR net [/ width >- ]] [ >-@@ -71,6 +74,12 @@ The >- flag is used to override the default interface. >- .LP >- The >-+.B -m >-+flag specifies the address that will receive the emails. >-+The default is >-+.IR root . >-+.LP >-+The >- .B -n >- flag specifies additional local networks. This can be useful to >- avoid "bogon" warnings when there is more than one network running >-@@ -83,6 +92,15 @@ The >- flag disables reporting any bogons. >- .LP >- The >-+.B -v >-+flag disables reporting on VRRP/CARP ethernet prefixes as described >-+in RFC5798 (00:00:5e:00:01:xx). >-+.LP >-+The >-+.B -z >-+flag disables reporting 0.0.0.0 changes, helpful in busy DHCP networks. >-+.LP >-+The >- .B -r >- flag is used to specify a savefile >- (perhaps created by >-@@ -152,7 +170,7 @@ addresses was a DECnet address. >- .na >- .nh >- .nf >--/usr/operator/arpwatch - default directory >-+/usr/local/arpwatch - default directory >- arp.dat - ethernet/ip address database >- ethercodes.dat - vendor ethernet block list >- .ad > >Property changes on: net-mgmt/arpwatch/files/patch-arpwatch.8 >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: net-mgmt/arpwatch/files/patch-arpwatch.c >=================================================================== >--- net-mgmt/arpwatch/files/patch-arpwatch.c (revision 518766) >+++ net-mgmt/arpwatch/files/patch-arpwatch.c (nonexistent) >@@ -1,66 +0,0 @@ >---- arpwatch.c.orig 2004-01-22 22:18:20 UTC >-+++ arpwatch.c >-@@ -107,6 +107,8 @@ struct rtentry; >- >- char *prog; >- >-+char *Watcher = NULL; >-+ >- int can_checkpoint; >- int swapped; >- int nobogons; >-@@ -170,7 +172,7 @@ main(int argc, char **argv) >- interface = NULL; >- rfilename = NULL; >- pd = NULL; >-- while ((op = getopt(argc, argv, "df:i:n:Nr:")) != EOF) >-+ while ((op = getopt(argc, argv, "dvzf:i:m:n:Nr:")) != EOF) >- switch (op) { >- >- case 'd': >-@@ -202,6 +204,16 @@ main(int argc, char **argv) >- rfilename = optarg; >- break; >- >-+ case 'm': >-+ Watcher = optarg; >-+ break; >-+ case 'v': >-+ vrrpflag = 1; >-+ break; >-+ case 'z': >-+ zeroflag = 1; >-+ break; >-+ >- default: >- usage(); >- } >-@@ -321,7 +333,6 @@ main(int argc, char **argv) >- >- (void)setsignal(SIGINT, die); >- (void)setsignal(SIGTERM, die); >-- (void)setsignal(SIGHUP, die); >- if (rfilename == NULL) { >- (void)setsignal(SIGQUIT, checkpoint); >- (void)setsignal(SIGALRM, checkpoint); >-@@ -391,6 +402,12 @@ process_ether(register u_char *u, regist >- return; >- } >- >-+ /* Check for CARP-generated ARP replies and ignore them */ >-+ if (vrrpflag == 1 && MEMCMP(sha, vrrp_prefix, 5) == 0) { >-+ /* do nothing */ >-+ return; >-+ } >-+ >- /* Double check ethernet addresses */ >- if (MEMCMP(sea, sha, 6) != 0) { >- dosyslog(LOG_INFO, "ethernet mismatch", sia, sea, sha); >-@@ -751,6 +768,6 @@ usage(void) >- >- (void)fprintf(stderr, "Version %s\n", version); >- (void)fprintf(stderr, "usage: %s [-dN] [-f datafile] [-i interface]" >-- " [-n net[/width]] [-r file]\n", prog); >-+ " [-m email] [-n net[/width]] [-r file]\n", prog); >- exit(1); >- } > >Property changes on: net-mgmt/arpwatch/files/patch-arpwatch.c >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: net-mgmt/arpwatch/files/patch-configure >=================================================================== >--- net-mgmt/arpwatch/files/patch-configure (revision 518766) >+++ net-mgmt/arpwatch/files/patch-configure (nonexistent) >@@ -1,20 +0,0 @@ >---- configure.orig 2006-06-21 20:32:38 UTC >-+++ configure >-@@ -1419,7 +1419,7 @@ if test "${with_gcc+set}" = set; then >- withval="$with_gcc" >- >- fi; >-- V_CCOPT="-O" >-+# V_CCOPT="-O" >- V_INCLS="" >- if test "${srcdir}" != "." ; then >- V_INCLS="-I\$\(srcdir\)" >-@@ -5299,7 +5299,7 @@ echo "${ECHO_T}$ac_cv_lbl_gcc_vers" >&6 >- fi >- V_CCOPT="$V_CCOPT -Wall" >- if test "$ac_cv_lbl_gcc_vers" -gt 1 ; then >-- V_CCOPT="$V_CCOPT -Wmissing-prototypes -Wstrict-prototypes" >-+# V_CCOPT="$V_CCOPT -Wmissing-prototypes -Wstrict-prototypes" >- fi >- fi >- else > >Property changes on: net-mgmt/arpwatch/files/patch-configure >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: net-mgmt/arpwatch/files/patch-db.c >=================================================================== >--- net-mgmt/arpwatch/files/patch-db.c (revision 518766) >+++ net-mgmt/arpwatch/files/patch-db.c (nonexistent) >@@ -1,20 +0,0 @@ >---- db.c.orig 2000-09-30 23:39:58 UTC >-+++ db.c >-@@ -283,7 +283,7 @@ elist_alloc(register u_int32_t a, regist >- BCOPY(e, ep->e, 6); >- if (h == NULL && !initializing) >- h = getsname(a); >-- if (h != NULL && !isdigit((int)*h)) >-+ if (h != NULL) >- strcpy(ep->h, h); >- ep->t = t; >- return (ep); >-@@ -301,7 +301,7 @@ check_hname(register struct ainfo *ap) >- return; >- ep = ap->elist[0]; >- h = getsname(ap->a); >-- if (!isdigit((int)*h) && strcmp(h, ep->h) != 0) { >-+ if (h != NULL && strcmp(h, ep->h) != 0) { >- syslog(LOG_INFO, "hostname changed %s %s %s -> %s", >- intoa(ap->a), e2str(ep->e), ep->h, h); >- strcpy(ep->h, h); > >Property changes on: net-mgmt/arpwatch/files/patch-db.c >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: net-mgmt/arpwatch/files/patch-dns.c >=================================================================== >--- net-mgmt/arpwatch/files/patch-dns.c (revision 518766) >+++ net-mgmt/arpwatch/files/patch-dns.c (nonexistent) >@@ -1,33 +0,0 @@ >---- dns.c.orig 2000-10-14 01:50:52 UTC >-+++ dns.c >-@@ -137,7 +137,7 @@ gethinfo(register char *hostname, regist >- return (0); >- } >- >--/* Return the cannonical name of the host */ >-+/* Return the canonical name of the host (NULL if not found) */ >- char * >- gethname(u_int32_t a) >- { >-@@ -150,18 +150,18 @@ gethname(u_int32_t a) >- hp = gethostbyaddr((char *)&a, sizeof(a), AF_INET); >- _res.options = options; >- if (hp == NULL) >-- return (intoa(a)); >-+ return NULL; >- return (hp->h_name); >- } >- >--/* Return the simple name of the host */ >-+/* Return the simple name of the host (NULL if not found) */ >- char * >- getsname(register u_int32_t a) >- { >- register char *s, *cp; >- >- s = gethname(a); >-- if (!isdigit((int)*s)) { >-+ if (s != NULL) { >- cp = strchr(s, '.'); >- if (cp != NULL) >- *cp = '\0'; > >Property changes on: net-mgmt/arpwatch/files/patch-dns.c >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: net-mgmt/arpwatch/files/patch-report.c >=================================================================== >--- net-mgmt/arpwatch/files/patch-report.c (revision 518766) >+++ net-mgmt/arpwatch/files/patch-report.c (nonexistent) >@@ -1,76 +0,0 @@ >---- report.c.orig 2000-09-30 23:41:10 UTC >-+++ report.c >-@@ -45,6 +45,8 @@ struct rtentry; >- >- #include <ctype.h> >- #include <errno.h> >-+#include <fcntl.h> >-+#include <paths.h> >- #include <signal.h> >- #include <stdio.h> >- #include <stdlib.h> >-@@ -70,6 +72,8 @@ struct rtentry; >- >- #define PLURAL(n) ((n) == 1 || (n) == -1 ? "" : "s") >- >-+extern char *Watcher; >-+ >- static int cdepth; /* number of outstanding children */ >- >- static char *fmtdate(time_t); >-@@ -240,7 +244,7 @@ report(register char *title, register u_ >- register FILE *f; >- char tempfile[64], cpu[64], os[64]; >- char *fmt = "%20s: %s\n"; >-- char *watcher = WATCHER; >-+ char *watcher = Watcher ? Watcher : WATCHER; >- char *watchee = WATCHEE; >- char *sendmail = PATH_SENDMAIL; >- char *unknown = "<unknown>"; >-@@ -251,6 +255,11 @@ report(register char *title, register u_ >- if (initializing) >- return; >- >-+ /* No mail for 0.0.0.0 if -z */ >-+ if (zeroflag == 1 && strncmp("0.0.0.0",intoa(a),16) == 0 ) { >-+ dosyslog(LOG_NOTICE, title, a, e1, e2); >-+ return; >-+ } >- if (debug) { >- if (debug > 1) { >- dosyslog(LOG_NOTICE, title, a, e1, e2); >-@@ -303,7 +312,7 @@ report(register char *title, register u_ >- (void)fprintf(f, "From: %s\n", watchee); >- (void)fprintf(f, "To: %s\n", watcher); >- hn = gethname(a); >-- if (!isdigit(*hn)) >-+ if (hn != NULL) >- (void)fprintf(f, "Subject: %s (%s)\n", title, hn); >- else { >- (void)fprintf(f, "Subject: %s\n", title); >-@@ -344,6 +353,25 @@ report(register char *title, register u_ >- exit(1); >- } >- /* XXX Need to freopen()? */ >-+ >-+ /* >-+ * Open /dev/null as stdout and stderr so that sendmail 8.12.1 (and >-+ * above ?) won't complain about missing file descriptors. >-+ */ >-+ if ((fd = open(_PATH_DEVNULL, O_RDWR)) == -1) { >-+ syslog(LOG_ERR, "Cannot open %s: %m", _PATH_DEVNULL); >-+ exit(1); >-+ } >-+ if (dup2(fd, STDOUT_FILENO) == -1) { >-+ syslog(LOG_ERR, "Cannot dup2 %s to stdout: %m", _PATH_DEVNULL); >-+ exit(1); >-+ } >-+ if (dup2(fd, STDERR_FILENO) == -1) { >-+ syslog(LOG_ERR, "Cannot dup2 %s to stderr: %m", _PATH_DEVNULL); >-+ exit(1); >-+ } >-+ close(fd); >-+ >- /* Always Deliver interactively (pause when child depth gets large) */ >- execl(sendmail, "sendmail", "-odi", watcher, NULL); >- syslog(LOG_ERR, "execl: %s: %m", sendmail); > >Property changes on: net-mgmt/arpwatch/files/patch-report.c >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: net-mgmt/arpwatch/files/patch-util.c >=================================================================== >--- net-mgmt/arpwatch/files/patch-util.c (revision 518766) >+++ net-mgmt/arpwatch/files/patch-util.c (nonexistent) >@@ -1,15 +0,0 @@ >---- util.c.orig 2004-01-22 22:25:39 UTC >-+++ util.c >-@@ -59,7 +59,12 @@ char *ethercodes = ETHERCODES; >- u_char zero[6] = { 0, 0, 0, 0, 0, 0 }; >- u_char allones[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; >- >-+/* VRRP/CARP ethernet prefix */ >-+u_char vrrp_prefix[5] = { 0x00, 0x00, 0x5e, 0x00, 0x01 }; >-+ >- int debug = 0; >-+int vrrpflag = 0; >-+int zeroflag = 0; >- int initializing = 1; /* true if initializing */ >- >- /* syslog() helper routine */ > >Property changes on: net-mgmt/arpwatch/files/patch-util.c >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: net-mgmt/arpwatch/files/patch-util.h >=================================================================== >--- net-mgmt/arpwatch/files/patch-util.h (revision 518766) >+++ net-mgmt/arpwatch/files/patch-util.h (nonexistent) >@@ -1,12 +0,0 @@ >---- util.h.orig 1996-10-06 10:22:14 UTC >-+++ util.h >-@@ -14,6 +14,9 @@ extern char *ethercodes; >- >- extern u_char zero[6]; >- extern u_char allones[6]; >-+extern u_char vrrp_prefix[5]; >- >- extern int debug; >-+extern int vrrpflag; >-+extern int zeroflag; >- extern int initializing; > >Property changes on: net-mgmt/arpwatch/files/patch-util.h >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: net-mgmt/arpwatch/files/pkg-message.in >=================================================================== >--- net-mgmt/arpwatch/files/pkg-message.in (revision 518766) >+++ net-mgmt/arpwatch/files/pkg-message.in (working copy) >@@ -1,12 +1,15 @@ > [ > { type: install > message: <<EOM >-You can update the ethercodes.dat file executing the following steps >+You can update the ethercodes.dat file executing the following steps: > >-cd %%PREFIX%%/arpwatch >-fetch -o- http://standards-oui.ieee.org//oui.txt | tr -d "\15" > oui.txt >-./massagevendor oui.txt > ethercodes.dat >-rm oui.txt >+ cd %%PREFIX%%/arpwatch >+ fetch http://standards-oui.ieee.org/oui/oui.csv >+ ./massagevendor oui.csv > ethercodes.dat >+ rm oui.csv >+ >+You might also want to disable the ETHERCODES option when building >+to avoid clobbering ethercodes.dat on update or reinstall. > EOM > } > ] >Index: net-mgmt/arpwatch/pkg-descr >=================================================================== >--- net-mgmt/arpwatch/pkg-descr (revision 518766) >+++ net-mgmt/arpwatch/pkg-descr (working copy) >@@ -2,4 +2,4 @@ > maintains a database of ethernet/ip address pairings. It also reports > certain changes via email. > >-WWW: http://ee.lbl.gov/ >+WWW: https://ee.lbl.gov/downloads/arpwatch/ >Index: net-mgmt/arpwatch/pkg-plist >=================================================================== >--- net-mgmt/arpwatch/pkg-plist (revision 518766) >+++ net-mgmt/arpwatch/pkg-plist (working copy) >@@ -6,6 +6,7 @@ > arpwatch/euppertolower.awk > arpwatch/massagevendor > arpwatch/p.awk >+etc/rc.d/arpwatch > man/man8/arpsnmp.8.gz > man/man8/arpwatch.8.gz > sbin/arpsnmp
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 242346
:
209580
|
209581
|
209664
|
209676