summaryrefslogtreecommitdiffstats
path: root/meta-security/recipes-security/audit/audit/fix-swig-host-contamination.patch
blob: 16bb173ad44965028dbf30c0357618a3b36dac1f (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
audit: Fixed swig host contamination issue

The audit build uses swig to generate a python wrapper.
Unfortunately, the swig info file references host include
directories.  Some of these were previously noticed and
eliminated, but the one fixed here was not.

Upstream Status:  pending

Signed-off-by: Anders Hedlund <anders.hedlund@windriver.com>
Signed-off-by: Joe Slater <jslater@windriver.com>

Index: audit-2.2.1/swig/Makefile.am
===================================================================
--- audit-2.2.1.orig/swig/Makefile.am
+++ audit-2.2.1/swig/Makefile.am
@@ -25,6 +25,7 @@ AM_CFLAGS = -fPIC -DPIC -fno-strict-alia
 PYLIBVER ?= python$(PYTHON_VERSION)
 PYINC ?= /usr/include/$(PYLIBVER)
 INCLUDES = -I. -I$(top_builddir) -I${top_srcdir}/lib -I$(PYINC)
+STDINC ?= /usr/include
 LIBS = $(top_builddir)/lib/libaudit.la
 pyexec_PYTHON = audit.py
 pyexec_LTLIBRARIES = _audit.la
@@ -34,7 +35,7 @@ _audit_la_HEADERS: $(top_builddir)/confi
 _audit_la_DEPENDENCIES =${top_srcdir}/lib/libaudit.h ${top_builddir}/lib/libaudit.la
 nodist__audit_la_SOURCES  = audit_wrap.c
 audit.py audit_wrap.c: ${srcdir}/auditswig.i 
-	swig -o audit_wrap.c -python ${INCLUDES} ${srcdir}/auditswig.i 
+	swig -o audit_wrap.c -python ${INCLUDES} -I$(STDINC) ${srcdir}/auditswig.i
 
 CLEANFILES = audit.py* audit_wrap.c *~
 
Index: audit-2.2.1/swig/auditswig.i
===================================================================
--- audit-2.2.1.orig/swig/auditswig.i
+++ audit-2.2.1/swig/auditswig.i
@@ -37,8 +37,8 @@ signed
 #define __attribute(X) /*nothing*/
 typedef unsigned __u32;
 typedef unsigned uid_t;
-%include "/usr/include/linux/audit.h"
+%include "linux/audit.h"
 #define __extension__ /*nothing*/
-%include "/usr/include/stdint.h"
+%include "stdint.h"
 %include "../lib/libaudit.h"