- update to 2.1a10

- 3 patches have been integrated
  - Add -n flag (alternate networks) and -N flag (don't report bogons).
- tighten DESCR
- strip binaries
This commit is contained in:
camield 2000-12-19 12:12:36 +00:00
parent beb20af917
commit 42ad82509d
8 changed files with 24 additions and 114 deletions

View File

@ -1,12 +1,11 @@
# $OpenBSD: Makefile,v 1.11 2000/10/22 15:42:55 espie Exp $
# $OpenBSD: Makefile,v 1.12 2000/12/19 12:12:36 camield Exp $
DISTNAME= arpwatch-2.1a4
DISTNAME= arpwatch-2.1a10
CATEGORIES= net
NEED_VERSION= 1.305
MASTER_SITES= http://www.Awfulhak.org/arpwatch/ \
ftp://ftp.ee.lbl.gov/ \
ftp://ftp.cso.uiuc.edu/pub/security/coast/unix/arpwatch/
EXTRACT_SUFX= .tar.Z
MAINTAINER= ports@openbsd.org
@ -20,15 +19,11 @@ CONFIGURE_ARGS= --quiet
INSTALL_TARGET= install install-man
post-install:
@if [ ! -d ${PREFIX}/arpwatch ]; then \
mkdir -p ${PREFIX}/arpwatch; \
chmod 775 ${PREFIX}/arpwatch; \
chown root.operator ${PREFIX}/arpwatch; \
fi
@touch ${PREFIX}/arpwatch/arp.dat
@chmod 644 ${PREFIX}/arpwatch/arp.dat
@for file in ethercodes.dat d.awk e.awk p.awk; do \
${INSTALL_DATA} ${WRKSRC}/$$file ${PREFIX}/arpwatch; \
${STRIP} ${PREFIX}/sbin/arpwatch
${STRIP} ${PREFIX}/sbin/arpsnmp
${INSTALL_DATA_DIR} ${PREFIX}/arpwatch
@for i in arp.dat ethercodes.dat d.awk e.awk p.awk; do \
${INSTALL_DATA} ${WRKSRC}/$$i ${PREFIX}/arpwatch; \
done
@${INSTALL_SCRIPT} ${WRKSRC}/arp2ethers ${PREFIX}/arpwatch

View File

@ -1,3 +1,3 @@
MD5 (arpwatch-2.1a4.tar.Z) = 7f5ed680480e6b0b1bbf27a5634b0bd4
RMD160 (arpwatch-2.1a4.tar.Z) = 164aee97d3cf2f756b0f16cc0beac260af449000
SHA1 (arpwatch-2.1a4.tar.Z) = 3388b1d4dd4a345b5a9e9a30781e7decb09d2c50
MD5 (arpwatch-2.1a10.tar.gz) = c3f82f51f0c0bfcaf72b5fb216ab6a7b
RMD160 (arpwatch-2.1a10.tar.gz) = 852b4cbfee3987dd749b4a32b00fb92638950206
SHA1 (arpwatch-2.1a10.tar.gz) = 4d1d161e2ca5122064b75b35d2bfcafc6798607d

View File

@ -1,21 +0,0 @@
$OpenBSD: patch-aa,v 1.2 2000/10/12 09:37:35 camield Exp $
*** arp2ethers.orig Tue Mar 29 11:44:52 1994
--- arp2ethers Tue Jul 1 02:34:40 1997
***************
*** 14,20 ****
#
sort +2rn arp.dat | \
! awk -e 'NF == 4 { print }' | \
awk -f p.awk | \
egrep -v '\.[0-9][0-9]*$' | \
sed -e 's/ .* / /' | \
--- 14,20 ----
#
sort +2rn arp.dat | \
! awk 'NF == 4 { print }' | \
awk -f p.awk | \
egrep -v '\.[0-9][0-9]*$' | \
sed -e 's/ .* / /' | \

View File

@ -1,13 +0,0 @@
$OpenBSD: patch-ab,v 1.2 2000/10/12 09:37:35 camield Exp $
--- p.awk.orig Wed Mar 25 15:01:16 1998
+++ p.awk Wed Mar 25 15:01:43 1998
@@ -3,7 +3,7 @@
{
e = $1
if (seen[e])
- continue
+ next
seen[e] = 1
print $0
}

View File

@ -1,29 +0,0 @@
$OpenBSD: patch-mktemp,v 1.1 2000/10/13 07:25:39 camield Exp $
Correct insecure tempfile handling.
--- report.c.orig Wed Jul 29 07:16:46 1998
+++ report.c Fri Oct 13 09:15:00 2000
@@ -239,7 +239,7 @@
register u_char *e2, register time_t *t1p, register time_t *t2p)
{
register char *cp, *hn;
- register int pid;
+ register int fd, pid;
register FILE *f;
char tempfile[64], cpu[64], os[64];
char *fmt = "%20s: %s\n";
@@ -286,8 +286,11 @@
/* Child */
closelog();
(void)strcpy(tempfile, "/tmp/arpwatch.XXXXXX");
- (void)mktemp(tempfile);
- if ((f = fopen(tempfile, "w+")) == NULL) {
+ if ((fd = mkstemp(tempfile)) == -1 || (f = fdopen(fd, "w+")) == NULL) {
+ if (fd != -1) {
+ unlink(tempfile);
+ close(fd);
+ }
syslog(LOG_ERR, "child open(%s): %m", tempfile);
exit(1);
}

View File

@ -1,17 +1,18 @@
$OpenBSD: patch-no_ip,v 1.1 2000/10/12 09:37:35 camield Exp $
$OpenBSD: patch-no_ip,v 1.2 2000/12/19 12:12:41 camield Exp $
Do not bail if the interface does not have an IP assigned.
--- arpwatch.c.orig Tue Feb 10 01:35:15 1998
+++ arpwatch.c Tue Oct 10 10:13:08 2000
@@ -191,9 +193,10 @@
--- arpwatch.c.orig Sat Oct 14 04:07:35 2000
+++ arpwatch.c Tue Dec 19 11:38:16 2000
@@ -223,9 +223,11 @@
/* Determine network and netmask */
if (pcap_lookupnet(interface, &net, &netmask, errbuf) < 0) {
- (void)fprintf(stderr, "%s: bad interface %s: %s\n",
- prog, interface, errbuf);
- exit(1);
+ (void)fprintf(stderr, "%s: WARNING: %s\n",
+ (void)fprintf(stderr,
+ "%s: WARNING: cannot determine net/mask: %s\n",
+ prog, errbuf);
+ net = 0;
+ netmask = 0;

View File

@ -1,33 +1,8 @@
Maintained under FreeBSD by: brian@awfulhak.org
Arpwatch monitors ethernet activity and maintains a database of
ethernet/ip address pairings. It also reports certain changes via
email.
ARPWATCH 2.0
Lawrence Berkeley National Laboratory
Network Research Group
arpwatch@ee.lbl.gov
ftp://ftp.ee.lbl.gov/arpwatch.tar.Z
This directory contains source code for arpwatch and arpsnmp, tools
that monitors ethernet activity and maintain a database of ethernet/ip
address pairings. It also reports certain changes via email.
Arpwatch uses libpcap, a system-independent interface for user-level
packet capture. Before building arpwatch, you must first retrieve and
build libpcap, also from LBL, in:
ftp://ftp.ee.lbl.gov/libpcap.tar.Z.
Once libpcap is built (either install it or make sure arpwatch and
libpcap share the same parent directory), you can build arpwatch using
the procedure in the INSTALL file.
Arpsnmp has the same database features of arpwatch but relies on an
external agent to collect the arp data. This distribution contains a
script, arpfetch, that uses snmpwalk from the CMU SNMP package. This
package is available from:
ftp://ftp.net.cmu.edu/pub/snmp-dist/cmu-snmp*.tar.Z
It should be trivial to adaptive the output of any snmp query program
for use with arpsnmp.
Arpsnmp has the same database features of arpwatch but relies on
an external agent to collect the arp data.
Please send bugs and comments to arpwatch@ee.lbl.gov.

View File

@ -1,9 +1,11 @@
@comment $OpenBSD: PLIST,v 1.4 2000/10/12 09:37:35 camield Exp $
@comment $OpenBSD: PLIST,v 1.5 2000/12/19 12:12:43 camield Exp $
sbin/arpwatch
sbin/arpsnmp
man/man8/arpwatch.8
man/man8/arpsnmp.8
@mode 0644
arpwatch/arp.dat
@mode
arpwatch/arp2ethers
arpwatch/ethercodes.dat
arpwatch/d.awk