Blame SOURCES/0013-libqpol-Skip-types-when-building-type-attribute-map.patch

53d48a
From f7b31b7e28a4f89bcfcd0d139cfca78777a4333e Mon Sep 17 00:00:00 2001
53d48a
From: Chris PeBenito <cpebenito@tresys.com>
53d48a
Date: Thu, 4 Feb 2016 14:06:49 -0500
53d48a
Subject: [PATCH] libqpol: Skip types when building type attribute map.
53d48a
53d48a
Fix originally from Richard Haines.
53d48a
53d48a
Closes #94.
53d48a
---
53d48a
 libqpol/src/policy_extend.c | 3 +++
53d48a
 1 file changed, 3 insertions(+)
53d48a
53d48a
diff --git a/libqpol/src/policy_extend.c b/libqpol/src/policy_extend.c
53d48a
index 1417271..416bddb 100644
53d48a
--- a/libqpol/src/policy_extend.c
53d48a
+++ b/libqpol/src/policy_extend.c
53d48a
@@ -201,6 +201,9 @@ static int qpol_policy_build_attrs_from_map(qpol_policy_t * policy)
53d48a
 	memset(&buff, 0, 10 * sizeof(char));
53d48a
 
53d48a
 	for (i = 0; i < db->p_types.nprim; i++) {
53d48a
+		/* skip types */
53d48a
+		if (db->type_val_to_struct[i]->flavor == TYPE_TYPE)
53d48a
+			continue;
53d48a
 		count = 0;
53d48a
 		ebitmap_for_each_bit(&db->attr_type_map[i], node, bit) {
53d48a
 			if (ebitmap_node_get_bit(node, bit))
53d48a
-- 
53d48a
2.5.0
53d48a