Compare commits

...
Sign in to create a new pull request.

17 commits

Author SHA1 Message Date
Benjamin A. Beasley
d296c89626 Generate ethercodes.dat from latest oui.csv 2024-03-28 09:35:48 -04:00
Benjamin A. Beasley
e9b01b08c6 Update to 3.6 (close RHBZ#2259459) 2024-01-22 09:00:46 -05:00
Benjamin A. Beasley
3b72cd5512 Generate ethercodes.dat from latest oui.csv 2024-01-21 21:46:43 -05:00
Benjamin A. Beasley
5440d93dfe Generate ethercodes.dat from latest oui.csv 2024-01-02 12:47:41 -05:00
Benjamin A. Beasley
e7977a31ff Switch to dynamically-allocated service user/group ID’s 2023-12-04 13:15:06 -05:00
Benjamin A. Beasley
94d46b2084 Update to 3.5 (close RHBZ#2252673) 2023-12-03 22:43:03 -05:00
Benjamin A. Beasley
e70b44cdda Generate ethercodes.dat from latest oui.csv 2023-12-03 20:12:26 -05:00
Benjamin A. Beasley
81a0ca5f68 Generate ethercodes.dat from latest oui.csv 2023-11-10 13:21:34 -05:00
Benjamin A. Beasley
f2f97f0b1f Generate ethercodes.dat from latest oui.csv 2023-10-04 10:40:54 -04:00
Benjamin A. Beasley
75ff8d205f Update to 3.4 (close RHBZ#2237532) 2023-09-06 13:16:40 -04:00
Benjamin A. Beasley
5f457a6f84 Generate ethercodes.dat from latest oui.csv 2023-09-06 08:06:20 -04:00
Benjamin A. Beasley
398901256a Generate ethercodes.dat from latest oui.csv 2023-08-21 13:35:47 -04:00
Benjamin A. Beasley
18d314301c Generate ethercodes.dat from latest oui.csv 2023-07-13 00:41:04 -04:00
Benjamin A. Beasley
996e5988b3 Generate ethercodes.dat from latest oui.csv 2023-05-24 17:54:54 -04:00
Benjamin A. Beasley
a81eba6b0f Generate ethercodes.dat from latest oui.csv 2023-04-25 10:46:31 -04:00
Benjamin A. Beasley
b5d33e328d Generate ethercodes.dat from latest oui.csv 2023-03-26 09:21:13 -04:00
Benjamin A. Beasley
fdfd2106fa Generate ethercodes.dat from latest oui.csv 2023-02-15 17:18:17 -05:00
8 changed files with 24050 additions and 22011 deletions

3
.gitignore vendored
View file

@ -3,3 +3,6 @@
/arpwatch-3.1.tar.gz
/arpwatch-3.2.tar.gz
/arpwatch-3.3.tar.gz
/arpwatch-3.4.tar.gz
/arpwatch-3.5.tar.gz
/arpwatch-3.6.tar.gz

View file

@ -1,15 +0,0 @@
When arpwatch is terminated cleanly by a signal (INT/TERM/HUP) handler, the
exit code should be zero for success instead of nonzero for failure.
diff -Naur arpwatch-3.1-original/arpwatch.c arpwatch-3.1/arpwatch.c
--- arpwatch-3.1-original/arpwatch.c 2019-11-30 13:35:23.000000000 -0500
+++ arpwatch-3.1/arpwatch.c 2020-11-08 12:55:51.429575973 -0500
@@ -892,7 +892,7 @@
lg(LOG_DEBUG, "exiting");
checkpoint(0);
- exit(1);
+ exit(0);
}
RETSIGTYPE

View file

@ -1,15 +1,8 @@
When -i is not given, iterate all available devices until a usable one is found
instead of just trying the first one and giving up if it is not usable. See
RHBZ #842660.
Additionally, handle the case where a device provides both supported and
unsupported datalink types.
diff -Naur arpwatch-3.1-original/arpwatch.c arpwatch-3.1/arpwatch.c
--- arpwatch-3.1-original/arpwatch.c 2019-11-30 13:35:23.000000000 -0500
+++ arpwatch-3.1/arpwatch.c 2021-04-24 09:02:50.762535242 -0400
@@ -161,6 +161,8 @@
RETSIGTYPE die(int);
diff -Naur arpwatch-3.5-original/arpwatch.c arpwatch-3.5/arpwatch.c
--- arpwatch-3.5-original/arpwatch.c 2023-12-03 13:10:05.000000000 -0500
+++ arpwatch-3.5/arpwatch.c 2023-12-03 20:06:32.694857659 -0500
@@ -163,6 +163,8 @@
void hup(int);
int isbogon(u_int32_t);
int main(int, char **);
+int try_open_live(pcap_t ** pd_ptr, char const * interface_name,
@ -17,7 +10,7 @@ diff -Naur arpwatch-3.1-original/arpwatch.c arpwatch-3.1/arpwatch.c
void process_ether(u_char *, const struct pcap_pkthdr *, const u_char *);
void process_fddi(u_char *, const struct pcap_pkthdr *, const u_char *);
int readsnmp(char *);
@@ -177,7 +179,7 @@
@@ -179,7 +181,7 @@
int op, snaplen, timeout, linktype, status;
pcap_t *pd;
FILE *fp;
@ -26,7 +19,7 @@ diff -Naur arpwatch-3.1-original/arpwatch.c arpwatch-3.1/arpwatch.c
char *interface, *rfilename;
struct bpf_program code;
char errbuf[PCAP_ERRBUF_SIZE];
@@ -309,13 +311,18 @@
@@ -311,13 +313,18 @@
"%s: pcap_findalldevs: %s\n", prog, errbuf);
exit(1);
}
@ -48,7 +41,7 @@ diff -Naur arpwatch-3.1-original/arpwatch.c arpwatch-3.1/arpwatch.c
#else
if (interface = pcap_lookupdev(errbuf)) == NULL) {
(void)fprintf(stderr,
@@ -354,15 +361,12 @@
@@ -356,15 +363,12 @@
}
swapped = pcap_is_swapped(pd);
} else {
@ -68,7 +61,7 @@ diff -Naur arpwatch-3.1-original/arpwatch.c arpwatch-3.1/arpwatch.c
#ifdef WORDS_BIGENDIAN
swapped = 1;
#endif
@@ -452,6 +456,74 @@
@@ -454,6 +458,74 @@
exit(0);
}

View file

@ -0,0 +1,12 @@
diff -Naur arpwatch-3.5-original/arpwatch.c arpwatch-3.5/arpwatch.c
--- arpwatch-3.5-original/arpwatch.c 2023-12-03 13:10:05.000000000 -0500
+++ arpwatch-3.5/arpwatch.c 2023-12-03 20:04:01.834691097 -0500
@@ -915,7 +915,7 @@
{
lg(LOG_DEBUG, "exiting");
checkpoint(0);
- exit(1);
+ exit(0);
}
void

View file

@ -1,6 +1,6 @@
Name: arpwatch
Epoch: 14
Version: 3.3
Version: 3.6
Release: %autorelease
Summary: Network monitoring tools for tracking IP addresses on a network
@ -25,6 +25,7 @@ BuildRequires: gcc
BuildRequires: make
BuildRequires: /usr/sbin/sendmail
BuildRequires: systemd-rpm-macros
%{?sysuser_requires_compat}
BuildRequires: python3-devel
BuildRequires: libpcap-devel
@ -37,12 +38,13 @@ Source0: https://ee.lbl.gov/downloads/arpwatch/arpwatch-%{version}.tar.gz
# updated), we store the file directly in the repository with the spec file;
# see the update-oui-csv script.
#
# File oui.csv last fetched 2023-01-18T01:27:49+00:00.
# File oui.csv last fetched 2024-03-28T13:35:48+00:00.
Source1: oui.csv
Source2: arpwatch.service
Source3: arpwatch.sysconfig
Source4: arp2ethers.8
Source5: massagevendor.8
Source6: arpwatch.sysusers
# The latest versions of all “arpwatch-3.1-*” patches were sent upstream by
# email 2021-04-24.
@ -69,12 +71,12 @@ Patch: arpwatch-3.1-configure-no-local-pcap.patch
Patch: arpwatch-3.1-all-zero-bogon.patch
# When arpwatch is terminated cleanly by a signal (INT/TERM/HUP) handler, the
# exit code should be zero for success instead of nonzero for failure.
Patch: arpwatch-3.1-exitcode.patch
Patch: arpwatch-3.5-exitcode.patch
# When -i is not given, do not just try the first device found, but keep
# checking devices until a usable one is found, if any is available.
# Additionally, handle the case where a device provides both supported and
# unsupported datalink types.
Patch: arpwatch-3.1-devlookup.patch
Patch: arpwatch-3.5-devlookup.patch
# Replace _getshort(), “a glibc function that hasn't been declared in the
# installed headers for many, many years,” with ns_get16(). Fixes C99
@ -86,15 +88,6 @@ Patch: arpwatch-3.3-c99.patch
ExcludeArch: %{ix86}
%global pkgstatedir %{_sharedstatedir}/arpwatch
%global service_user arpwatch
%global service_group arpwatch
# Soft static UID and GID; see
# https://fedoraproject.org/wiki/Packaging:UsersAndGroups#Soft_static_allocation
# for information, and the uidgid file in the setup package
# (https://pagure.io/setup/blob/master/f/uidgid) for the list of allocations,
# including the one for arpwatch.
%global service_uid 77
%global service_gid 77
%description
The arpwatch package contains arpwatch and arpsnmp. Arpwatch and arpsnmp are
@ -128,11 +121,20 @@ awk '/^ \* / { print substr($0, 4); } /^ \*\// { exit }' arpwatch.c |
%build
%set_build_flags
# Prior to version 3.4, this was handled by the configure script. If it is not
# defined, the build failes because time.h is not included in report.c. This
# regregression was reported upstream by email to arpwatch@ee.lbl.gov on
# 2023-09-06.
export CPPFLAGS="${CPPFLAGS-} -DTIME_WITH_SYS_TIME=1"
%configure --with-sendmail=/usr/sbin/sendmail PYTHON=%{python3}
%make_build ARPDIR=%{pkgstatedir}
%install
install -p -D -m 0644 %{SOURCE6} '%{buildroot}%{_sysusersdir}/arpwatch.conf'
# The upstream Makefile does not create the directories it requires, so we must
# do it manually. Additionally, it attempts to comment out the installation of
# the init script on non-FreeBSD platforms, but this does not quite work as
@ -193,22 +195,7 @@ fi
%pre
getent group %{service_group} >/dev/null ||
groupadd -f -g %{service_gid} -r %{service_group}
if ! getent passwd %{service_user} >/dev/null
then
if ! getent passwd %{service_uid} >/dev/null
then
useradd -r -u %{service_uid} -g %{service_group} \
-d %{pkgstatedir} -s /sbin/nologin \
-c "Service user for arpwatch" %{service_user}
else
useradd -r -g %{service_group} \
-d %{pkgstatedir} -s /sbin/nologin \
-c "Service user for arpwatch" %{service_user}
fi
fi
exit 0
%sysusers_create_compat %{SOURCE6}
%postun
@ -239,13 +226,14 @@ exit 0
%attr(0644,-,-) %{_mandir}/man8/*.8*
%{_unitdir}/arpwatch.service
%{_sysusersdir}/arpwatch.conf
%config(noreplace) %{_sysconfdir}/sysconfig/arpwatch
%attr(1775,-,%{service_group}) %dir %{pkgstatedir}
%attr(0644,%{service_user},%{service_group}) %verify(not md5 size mtime) %config(noreplace) %{pkgstatedir}/arp.dat
%attr(0644,%{service_user},%{service_group}) %verify(not md5 size mtime) %config(noreplace) %{pkgstatedir}/arp.dat-
%attr(0600,%{service_user},%{service_group}) %verify(not md5 size mtime) %ghost %{pkgstatedir}/arp.dat.new
%attr(0644,-,%{service_group}) %verify(not md5 size mtime) %config(noreplace) %{pkgstatedir}/ethercodes.dat
%attr(1775,-,arpwatch) %dir %{pkgstatedir}
%attr(0644,arpwatch,arpwatch) %verify(not md5 size mtime) %config(noreplace) %{pkgstatedir}/arp.dat
%attr(0644,arpwatch,arpwatch) %verify(not md5 size mtime) %config(noreplace) %{pkgstatedir}/arp.dat-
%attr(0600,arpwatch,arpwatch) %verify(not md5 size mtime) %ghost %{pkgstatedir}/arp.dat.new
%attr(0644,-,arpwatch) %verify(not md5 size mtime) %config(noreplace) %{pkgstatedir}/ethercodes.dat
%changelog

2
arpwatch.sysusers Normal file
View file

@ -0,0 +1,2 @@
#Type Name ID GECOS Home directory Shell
u arpwatch - "Service user for arpwatch" /var/lib/arpwatch /sbin/nologin

45946
oui.csv

File diff suppressed because it is too large Load diff

View file

@ -1 +1 @@
SHA512 (arpwatch-3.3.tar.gz) = 4e3d542917dc9060ae7b35b40f41cb696eb36e68846194a76f025c5ecb1df1e67d5c1c66ba3c7e581e1f915b988d05cb7805f28d410784bd27dc3a448dccdece
SHA512 (arpwatch-3.6.tar.gz) = 5ba47b15f294396f79efa4b72743169b9eb36747d675144e8f456a23d3987dc0d719d9b97704e7eeec0795f03ee7ef7e8fe8a4ba1ee35d19ab8ec6b077d345e8