From f4edfe43771e75e2a270f077830319268ef0da3a Mon Sep 17 00:00:00 2001 From: xuguangmin Date: Wed, 24 Jul 2024 15:21:49 +0800 Subject: [PATCH] Make IPX packet interpretation dependent on the ipx header file existing. --- audit.spec | 6 +- ...dent-on-the-ipx-header-file-existing.patch | 75 +++++++++++++++++++ 2 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 backport-make-IPX-packet-interpretation-dependent-on-the-ipx-header-file-existing.patch diff --git a/audit.spec b/audit.spec index 45415b9..83a0e23 100644 --- a/audit.spec +++ b/audit.spec @@ -2,7 +2,7 @@ Summary: User space tools for kernel auditing Name: audit Epoch: 1 Version: 3.0.1 -Release: 16 +Release: 17 License: GPLv2+ and LGPLv2+ URL: https://people.redhat.com/sgrubb/audit/ Source0: https://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz @@ -79,6 +79,7 @@ Patch67: backport-avoiding-of-NULL-pointers-dereference-366.patch Patch68: backport-Cleanup-code-in-LRU.patch Patch69: backport-Fix-memory-leaks.patch Patch70: backport-fix-one-more-leak.patch +Patch71: backport-make-IPX-packet-interpretation-dependent-on-the-ipx-header-file-existing.patch BuildRequires: gcc swig libtool systemd kernel-headers >= 2.6.29 BuildRequires: openldap-devel krb5-devel libcap-ng-devel @@ -414,6 +415,9 @@ fi %attr(644,root,root) %{_mandir}/man8/*.8.gz %changelog +* Wed JuL 24 2024 xuguangmin - 1:3.0.1-17 +- backport patches from upstream: Make IPX packet interpretation dependent on the ipx header file existing. + * Wed Jun 19 2024 xuraoqing - 1:3.0.1-16 - backport patches from upstream diff --git a/backport-make-IPX-packet-interpretation-dependent-on-the-ipx-header-file-existing.patch b/backport-make-IPX-packet-interpretation-dependent-on-the-ipx-header-file-existing.patch new file mode 100644 index 0000000..96f015d --- /dev/null +++ b/backport-make-IPX-packet-interpretation-dependent-on-the-ipx-header-file-existing.patch @@ -0,0 +1,75 @@ +From 0e3e6d21937533b6b3c498509b31deca61fdc1d7 Mon Sep 17 00:00:00 2001 +From: Super User +Date: Wed, 24 Jul 2024 10:27:08 +0800 +Subject: [PATCH] Make IPX packet interpretation dependent on the ipx header + file existing + +--- + ChangeLog | 2 ++ + auparse/interpret.c | 8 ++++++-- + configure.ac | 6 ++++++ + 3 files changed, 14 insertions(+), 2 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 24f754f..b06a4c5 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,5 @@ ++ 3.0.6 ++ - Make IPX packet interpretation dependent on the ipx header file existing + 3.0.1 + - Update syscall table to the 5.11 kernel + - Add new --eoe-timeout option to ausearch and aureport (Burn Alting) +diff --git a/audit-3.0.1/auparse/interpret.c b/audit-3.0.1/auparse/interpret.c +index db5116a..37d1d71 100644 +--- a/auparse/interpret.c ++++ b/auparse/interpret.c +@@ -44,8 +44,10 @@ + #include + #include + #include +-#include // FIXME: remove when ipx.h is fixed +-#include ++#ifdef HAVE_IPX_HEADERS ++ #include // FIXME: remove when ipx.h is fixed ++ #include ++#endif + #include + #include + #include +@@ -1195,6 +1197,7 @@ static const char *print_sockaddr(const char *val) + x->sax25_call.ax25_call[6]); + } + break; ++#ifdef HAVE_IPX_HEADERS + case AF_IPX: + { + const struct sockaddr_ipx *ip = +@@ -1204,6 +1207,7 @@ static const char *print_sockaddr(const char *val) + str, ip->sipx_port, ip->sipx_network); + } + break; ++#endif + case AF_ATMPVC: + { + const struct sockaddr_atmpvc* at = +diff --git a/configure.ac b/configure.ac +index 57c961a..640acf7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -424,6 +424,12 @@ AC_ARG_WITH(libwrap, + ) + if test x"$LIBWRAP_LIBS" != "x"; then + AC_DEFINE_UNQUOTED(HAVE_LIBWRAP, [], Define if tcp_wrappers support is enabled ) ++ ++fi ++# linux/ipx.h - deprecated in 2018 ++AC_CHECK_HEADER(linux/ipx.h, ipx_headers=yes, ipx_headers=no) ++if test $ipx_headers = yes ; then ++ AC_DEFINE(HAVE_IPX_HEADERS,1,[IPX packet interpretation]) + fi + + # See if we want to support lower capabilities for plugins +-- +2.41.0 + -- Gitee