From de5d5ede603bfad6f12fcd8fe623c8294767ff1c Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Tue, 15 Jan 2019 14:36:29 +0100 Subject: [PATCH] libselinux/audit2why.so: Filter out non-python related symbols audit2why.so used to export libsepol.a symbols. We only need Python related symbols: - initaudit2why for python 2 - PyInit_audit2why for python3 Signed-off-by: Petr Lautrbach --- libselinux/src/Makefile | 2 +- libselinux/src/audit2why.map | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 libselinux/src/audit2why.map diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile index 8891086e..92e30738 100644 --- a/libselinux/src/Makefile +++ b/libselinux/src/Makefile @@ -165,7 +165,7 @@ $(AUDIT2WHYLOBJ): audit2why.c $(CC) $(filter-out -Werror, $(CFLAGS)) $(PYINC) -fPIC -DSHARED -c -o $@ $< $(AUDIT2WHYSO): $(AUDIT2WHYLOBJ) $(LIBSEPOLA) - $(CC) $(CFLAGS) $(LDFLAGS) -L. -shared -o $@ $^ -lselinux $(LDLIBS_LIBSEPOLA) $(PYLIBS) + $(CC) $(CFLAGS) $(LDFLAGS) -L. -shared -o $@ $^ -lselinux $(LDLIBS_LIBSEPOLA) $(PYLIBS) -Wl,-soname,audit2why.so,--version-script=audit2why.map,-z,defs %.o: %.c policy.h $(CC) $(CFLAGS) $(TLSFLAGS) -c -o $@ $< diff --git a/libselinux/src/audit2why.map b/libselinux/src/audit2why.map new file mode 100644 index 00000000..65989a8d --- /dev/null +++ b/libselinux/src/audit2why.map @@ -0,0 +1,6 @@ +AUDIT2WHY_2.9 { + global: + initaudit2why; + PyInit_audit2why; + local: *; +};