summarylogtreecommitdiffstats
path: root/0001-checkpolicy-remove-unused-te_assertions.patch
diff options
context:
space:
mode:
authorNicolas Iooss2020-06-13 11:40:26 +0200
committerNicolas Iooss2020-06-13 11:40:26 +0200
commit4a5f267a432bbfd5c6679bc8ef976a5b406623b3 (patch)
tree3027e3bffc7e17bfbcef72e165f83b34b4f602b7 /0001-checkpolicy-remove-unused-te_assertions.patch
parentddf6ad6fce9a9b9e5cae2ae72e48e2d6caefafbd (diff)
downloadaur-4a5f267a432bbfd5c6679bc8ef976a5b406623b3.tar.gz
checkpolicy 3.0-2 update: remove unused te_assertions
gcc 10 fails to build checkpolicy: cc -o checkpolicy y.tab.o lex.yy.o queue.o module_compiler.o parse_util.o policy_define.o checkpolicy.o -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -l:libsepol.a cc -o checkmodule y.tab.o lex.yy.o queue.o module_compiler.o parse_util.o policy_define.o checkmodule.o -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -l:libsepol.a /usr/bin/ld: policy_define.o:(.bss+0x28): multiple definition of `te_assertions'; y.tab.o:(.bss+0x18): first defined here /usr/bin/ld: checkpolicy.o:(.bss+0x0): multiple definition of `te_assertions'; y.tab.o:(.bss+0x18): first defined here /usr/bin/ld: policy_define.o:(.bss+0x28): multiple definition of `te_assertions'; y.tab.o:(.bss+0x18): first defined here /usr/bin/ld: checkmodule.o:(.bss+0x0): multiple definition of `te_assertions'; y.tab.o:(.bss+0x18): first defined here Backport https://github.com/SELinuxProject/selinux/commit/4d330d0d3155211f119b3082f728ae42dcc01e96, which will be included in version 3.1.
Diffstat (limited to '0001-checkpolicy-remove-unused-te_assertions.patch')
-rw-r--r--0001-checkpolicy-remove-unused-te_assertions.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/0001-checkpolicy-remove-unused-te_assertions.patch b/0001-checkpolicy-remove-unused-te_assertions.patch
new file mode 100644
index 000000000000..deb6e76f2d39
--- /dev/null
+++ b/0001-checkpolicy-remove-unused-te_assertions.patch
@@ -0,0 +1,42 @@
+From 4d330d0d3155211f119b3082f728ae42dcc01e96 Mon Sep 17 00:00:00 2001
+From: Ondrej Mosnacek <omosnace@redhat.com>
+Date: Thu, 23 Jan 2020 13:57:15 +0100
+Subject: [PATCH] checkpolicy: remove unused te_assertions
+
+This variable is declared in a header file, but never defined or used.
+The te_assert structure definition is only used in this declaration, so
+remove both.
+
+Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
+---
+ checkpolicy/checkpolicy.h | 14 --------------
+ 1 file changed, 14 deletions(-)
+
+diff --git a/checkpolicy/checkpolicy.h b/checkpolicy/checkpolicy.h
+index 3868f1fa023b..f127687e72a6 100644
+--- a/checkpolicy/checkpolicy.h
++++ b/checkpolicy/checkpolicy.h
+@@ -1,20 +1,6 @@
+ #ifndef _CHECKPOLICY_H_
+ #define _CHECKPOLICY_H_
+
+-#include <sepol/policydb/ebitmap.h>
+-
+-typedef struct te_assert {
+- ebitmap_t stypes;
+- ebitmap_t ttypes;
+- ebitmap_t tclasses;
+- int self;
+- sepol_access_vector_t *avp;
+- unsigned long line;
+- struct te_assert *next;
+-} te_assert_t;
+-
+-te_assert_t *te_assertions;
+-
+ extern unsigned int policyvers;
+
+ #endif
+--
+2.27.0
+