From a34c9ef118e04908ff8bad5bd7749c57e6e46d94 Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Fri, 19 Feb 2016 11:42:00 +0100 Subject: [PATCH] libqpol: Skip types when building type attribute map Fixes: rhbz#1291336 --- ...pes-when-building-type-attribute-map.patch | 29 +++++++++++++++++++ setools.spec | 2 ++ 2 files changed, 31 insertions(+) create mode 100644 0013-libqpol-Skip-types-when-building-type-attribute-map.patch diff --git a/0013-libqpol-Skip-types-when-building-type-attribute-map.patch b/0013-libqpol-Skip-types-when-building-type-attribute-map.patch new file mode 100644 index 0000000..efdd8a9 --- /dev/null +++ b/0013-libqpol-Skip-types-when-building-type-attribute-map.patch @@ -0,0 +1,29 @@ +From f7b31b7e28a4f89bcfcd0d139cfca78777a4333e Mon Sep 17 00:00:00 2001 +From: Chris PeBenito +Date: Thu, 4 Feb 2016 14:06:49 -0500 +Subject: [PATCH] libqpol: Skip types when building type attribute map. + +Fix originally from Richard Haines. + +Closes #94. +--- + libqpol/src/policy_extend.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/libqpol/src/policy_extend.c b/libqpol/src/policy_extend.c +index 1417271..416bddb 100644 +--- a/libqpol/src/policy_extend.c ++++ b/libqpol/src/policy_extend.c +@@ -201,6 +201,9 @@ static int qpol_policy_build_attrs_from_map(qpol_policy_t * policy) + memset(&buff, 0, 10 * sizeof(char)); + + for (i = 0; i < db->p_types.nprim; i++) { ++ /* skip types */ ++ if (db->type_val_to_struct[i]->flavor == TYPE_TYPE) ++ continue; + count = 0; + ebitmap_for_each_bit(&db->attr_type_map[i], node, bit) { + if (ebitmap_node_get_bit(node, bit)) +-- +2.5.0 + diff --git a/setools.spec b/setools.spec index ad297b0..e80868c 100644 --- a/setools.spec +++ b/setools.spec @@ -27,6 +27,7 @@ Patch8: 0008-Add-alias-support-to-seinfo-t.patch Patch9: 0009-Fix-help-message-on-sesearch-D.patch Patch11: 0011-Fix-Wformat-security-issues.patch Patch12: 0012-Fix-configure.ac-to-use-SWIG-3.0.0.patch +Patch13: 0013-libqpol-Skip-types-when-building-type-attribute-map.patch Summary: Policy analysis tools for SELinux Group: System Environment/Base @@ -164,6 +165,7 @@ This package includes the following graphical tools: %patch9 -p 1 -b .sesearch-D %patch11 -p 1 -b .Wformat-security %patch12 -p 1 -b .version +%patch13 -p 1 -b .libqpol %ifarch sparc sparcv9 sparc64 s390 s390x for file in `find . -name Makefile.am`; do