libqpol: Skip types when building type attribute map

Fixes: rhbz#1291336
This commit is contained in:
Petr Lautrbach 2016-02-19 11:42:00 +01:00
parent 26a78c68ba
commit a34c9ef118
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,29 @@
From f7b31b7e28a4f89bcfcd0d139cfca78777a4333e Mon Sep 17 00:00:00 2001
From: Chris PeBenito <cpebenito@tresys.com>
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

View File

@ -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