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

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