Merge pull request #23991 from friendly-bits/master-geoip-shell
[feed/packages.git] / utils / audit / patches / 0003-Make-IPX-packet-interpretation-dependent-on-th.patch
1 From 6b09724c69d91668418ddb3af00da6db6755208c Mon Sep 17 00:00:00 2001
2 From: Steve Grubb <sgrubb@redhat.com>
3 Date: Thu, 2 Sep 2021 15:01:12 -0400
4 Subject: [PATCH] Make IPX packet interpretation dependent on the ipx header
5 file existing
6
7 --- a/auparse/interpret.c
8 +++ b/auparse/interpret.c
9 @@ -44,8 +44,10 @@
10 #include <linux/ax25.h>
11 #include <linux/atm.h>
12 #include <linux/x25.h>
13 -#include <linux/if.h> // FIXME: remove when ipx.h is fixed
14 -#include <linux/ipx.h>
15 +#ifdef HAVE_IPX_HEADERS
16 + #include <linux/if.h> // FIXME: remove when ipx.h is fixed
17 + #include <linux/ipx.h>
18 +#endif
19 #include <linux/capability.h>
20 #include <sys/personality.h>
21 #include <sys/prctl.h>
22 @@ -1158,6 +1160,7 @@ static const char *print_sockaddr(const
23 x->sax25_call.ax25_call[6]);
24 }
25 break;
26 +#ifdef HAVE_IPX_HEADERS
27 case AF_IPX:
28 {
29 const struct sockaddr_ipx *ip =
30 @@ -1167,6 +1170,7 @@ static const char *print_sockaddr(const
31 str, ip->sipx_port, ip->sipx_network);
32 }
33 break;
34 +#endif
35 case AF_ATMPVC:
36 {
37 const struct sockaddr_atmpvc* at =
38 --- a/configure.ac
39 +++ b/configure.ac
40 @@ -414,6 +414,12 @@ if test x"$LIBWRAP_LIBS" != "x"; then
41 AC_DEFINE_UNQUOTED(HAVE_LIBWRAP, [], Define if tcp_wrappers support is enabled )
42 fi
43
44 +# linux/ipx.h - deprecated in 2018
45 +AC_CHECK_HEADER(linux/ipx.h, ipx_headers=yes, ipx_headers=no)
46 +if test $ipx_headers = yes ; then
47 + AC_DEFINE(HAVE_IPX_HEADERS,1,[IPX packet interpretation])
48 +fi
49 +
50 # See if we want to support lower capabilities for plugins
51 LIBCAP_NG_PATH
52