blob: 054f50ab236c7ac89380373dd8b0cbdeeb9ce969 [file] [log] [blame]
Patrick Williams2390b1b2022-11-03 13:47:49 -05001From 6b09724c69d91668418ddb3af00da6db6755208c Mon Sep 17 00:00:00 2001
2From: Steve Grubb <sgrubb@redhat.com>
3Date: Thu, 2 Sep 2021 15:01:12 -0400
4Subject: [PATCH] Make IPX packet interpretation dependent on the ipx header
5 file existing
6
7Upstream-Status: Backport [https://github.com/linux-audit/audit-userspace/commit/6b09724c69d91668418ddb3af00da6db6755208c.patch]
8Comment: Remove one hunk from changelog file and refresh rest hunks as per codebase of audit_2.8.5
9Signed-off-by: Akash Hadke <akash.hadke@kpit.com>
10---
11 auparse/interpret.c | 8 ++++++--
12 configure.ac | 6 ++++++
13 2 files changed, 12 insertions(+), 2 deletions(-)
14
15diff --git a/auparse/interpret.c b/auparse/interpret.c
16index 63829aa0e..6c316456d 100644
17--- a/auparse/interpret.c 2022-10-14 11:22:20.833880000 +0200
18+++ b/auparse/interpret.c 2022-10-14 11:35:13.196455950 +0200
19@@ -44,8 +44,10 @@
20 #include <linux/ax25.h>
21 #include <linux/atm.h>
22 #include <linux/x25.h>
23-#include <linux/if.h> // FIXME: remove when ipx.h is fixed
24-#include <linux/ipx.h>
25+#ifdef HAVE_IPX_HEADERS
26+ #include <linux/if.h> // FIXME: remove when ipx.h is fixed
27+ #include <linux/ipx.h>
28+#endif
29 #include <linux/capability.h>
30 #include <sys/personality.h>
31 #include <sys/prctl.h>
32@@ -1158,6 +1160,7 @@
33 x->sax25_call.ax25_call[6]);
34 }
35 break;
36+#ifdef HAVE_IPX_HEADERS
37 case AF_IPX:
38 {
39 const struct sockaddr_ipx *ip =
40@@ -1167,6 +1170,7 @@
41 str, ip->sipx_port, ip->sipx_network);
42 }
43 break;
44+#endif
45 case AF_ATMPVC:
46 {
47 const struct sockaddr_atmpvc* at =
48diff --git a/configure.ac b/configure.ac
49index 8f541e4c0..005eb0b5b 100644
50--- a/configure.ac 2022-10-14 11:22:20.833880000 +0200
51+++ b/configure.ac 2022-10-14 11:36:32.391044084 +0200
52@@ -414,6 +414,12 @@
53 AC_DEFINE_UNQUOTED(HAVE_LIBWRAP, [], Define if tcp_wrappers support is enabled )
54 fi
55
56+# linux/ipx.h - deprecated in 2018
57+AC_CHECK_HEADER(linux/ipx.h, ipx_headers=yes, ipx_headers=no)
58+if test $ipx_headers = yes ; then
59+ AC_DEFINE(HAVE_IPX_HEADERS,1,[IPX packet interpretation])
60+fi
61+
62 # See if we want to support lower capabilities for plugins
63 LIBCAP_NG_PATH
64
65