7c2699540575058876ba64c72b942fece34c4f36
[AGL/meta-agl.git] / meta-app-framework / recipes-security / audit / audit / Fixed-swig-host-contamination-issue.patch
1 From a07271f1cce82122610b622bcea4a8a37528f321 Mon Sep 17 00:00:00 2001
2 From: Li xin <lixin.fnst@cn.fujitsu.com>
3 Date: Sun, 19 Jul 2015 02:42:58 +0900
4 Subject: [PATCH] audit: Fixed swig host contamination issue
5
6 The audit build uses swig to generate a python wrapper.
7 Unfortunately, the swig info file references host include
8 directories.  Some of these were previously noticed and
9 eliminated, but the one fixed here was not.
10
11 Upstream-Status: Inappropriate [embedded specific]
12
13 Signed-off-by: Anders Hedlund <anders.hedlund@windriver.com>
14 Signed-off-by: Joe Slater <jslater@windriver.com>
15 Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
16 ---
17  bindings/swig/python3/Makefile.am | 3 ++-
18  bindings/swig/src/auditswig.i     | 2 +-
19  2 files changed, 3 insertions(+), 2 deletions(-)
20
21 diff --git a/bindings/swig/python3/Makefile.am b/bindings/swig/python3/Makefile.am
22 index 9938418..fa46aac 100644
23 --- a/bindings/swig/python3/Makefile.am
24 +++ b/bindings/swig/python3/Makefile.am
25 @@ -22,6 +22,7 @@
26  CONFIG_CLEAN_FILES = *.loT *.rej *.orig
27  AM_CFLAGS = -fPIC -DPIC -fno-strict-aliasing $(PYTHON3_CFLAGS)
28  AM_CPPFLAGS = -I. -I$(top_builddir) -I${top_srcdir}/lib $(PYTHON3_INCLUDES)
29 +STDINC ?= /usr/include
30  LIBS = $(top_builddir)/lib/libaudit.la
31  SWIG_FLAGS = -python -py3 -modern
32  SWIG_INCLUDES = -I. -I$(top_builddir) -I${top_srcdir}/lib $(PYTHON3_INCLUDES)
33 @@ -37,7 +38,7 @@ _audit_la_DEPENDENCIES =${top_srcdir}/lib/libaudit.h ${top_builddir}/lib/libaudi
34  _audit_la_LIBADD = ${top_builddir}/lib/libaudit.la
35  nodist__audit_la_SOURCES  = audit_wrap.c
36  audit.py audit_wrap.c: ${srcdir}/../src/auditswig.i 
37 -       swig -o audit_wrap.c ${SWIG_FLAGS} ${SWIG_INCLUDES} ${srcdir}/../src/auditswig.i 
38 +       swig -o audit_wrap.c ${SWIG_FLAGS} ${SWIG_INCLUDES} -I$(STDINC) ${srcdir}/../src/auditswig.i
39  
40  CLEANFILES = audit.py* audit_wrap.c *~
41  
42 diff --git a/bindings/swig/src/auditswig.i b/bindings/swig/src/auditswig.i
43 index 7ebb373..424fb68 100644
44 --- a/bindings/swig/src/auditswig.i
45 +++ b/bindings/swig/src/auditswig.i
46 @@ -39,7 +39,7 @@ signed
47  #define __attribute(X) /*nothing*/
48  typedef unsigned __u32;
49  typedef unsigned uid_t;
50 -%include "/usr/include/linux/audit.h"
51 +%include "linux/audit.h"
52  #define __extension__ /*nothing*/
53  #include <stdint.h>
54  %include "../lib/libaudit.h"
55 -- 
56 2.7.4
57