aboutsummaryrefslogtreecommitdiff
path: root/utils/audit/patches/0003-Make-IPX-packet-interpretation-dependent-on-th.patch
blob: f4b4492c221ad7684d9fe7aa7e36edf5852edca7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
From 6b09724c69d91668418ddb3af00da6db6755208c Mon Sep 17 00:00:00 2001
From: Steve Grubb <sgrubb@redhat.com>
Date: Thu, 2 Sep 2021 15:01:12 -0400
Subject: [PATCH] Make IPX packet interpretation dependent on the ipx header
 file existing

--- a/auparse/interpret.c
+++ b/auparse/interpret.c
@@ -44,8 +44,10 @@
 #include <linux/ax25.h>
 #include <linux/atm.h>
 #include <linux/x25.h>
-#include <linux/if.h>   // FIXME: remove when ipx.h is fixed
-#include <linux/ipx.h>
+#ifdef HAVE_IPX_HEADERS
+  #include <linux/if.h>   // FIXME: remove when ipx.h is fixed
+  #include <linux/ipx.h>
+#endif
 #include <linux/capability.h>
 #include <sys/personality.h>
 #include <sys/prctl.h>
@@ -1158,6 +1160,7 @@ static const char *print_sockaddr(const
 					      x->sax25_call.ax25_call[6]);
                         }
                         break;
+#ifdef HAVE_IPX_HEADERS
                 case AF_IPX:
                         {
                                 const struct sockaddr_ipx *ip =
@@ -1167,6 +1170,7 @@ static const char *print_sockaddr(const
 					str, ip->sipx_port, ip->sipx_network);
                         }
                         break;
+#endif
                 case AF_ATMPVC:
                         {
                                 const struct sockaddr_atmpvc* at =
--- a/configure.ac
+++ b/configure.ac
@@ -414,6 +414,12 @@ 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
 LIBCAP_NG_PATH