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

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