Blame SOURCES/0001-libqpol-Do-not-fail-on-neverallow-rule-query.patch

4ea9f2
From b00d11c941b689fbf3441e80b318c6a05c6657e4 Mon Sep 17 00:00:00 2001
4ea9f2
From: Vit Mojzis <vmojzis@redhat.com>
4ea9f2
Date: Thu, 19 Oct 2017 15:17:21 +0200
4ea9f2
Subject: [PATCH] libqpol: Do not fail on neverallow rule query
4ea9f2
4ea9f2
Drawing upon the conclusion from:
4ea9f2
4ea9f2
77bd0f2103e8f02f02ba75dd5fd5ceb263d4f878
4ea9f2
No need to take into account the policy capabilities in sesearch code,
4ea9f2
the lower levels in the library handle it correctly. (fixes Fedora
4ea9f2
bug #526460)
4ea9f2
---
4ea9f2
 libqpol/src/avrule_query.c | 6 ------
4ea9f2
 1 file changed, 6 deletions(-)
4ea9f2
4ea9f2
diff --git a/libqpol/src/avrule_query.c b/libqpol/src/avrule_query.c
4ea9f2
index 749565b..c2dd010 100644
4ea9f2
--- a/libqpol/src/avrule_query.c
4ea9f2
+++ b/libqpol/src/avrule_query.c
4ea9f2
@@ -55,12 +55,6 @@ int qpol_policy_get_avrule_iter(const qpol_policy_t * policy, uint32_t rule_type
4ea9f2
 	}
4ea9f2
 #endif
4ea9f2
 
4ea9f2
-	if ((rule_type_mask & QPOL_RULE_NEVERALLOW) && !qpol_policy_has_capability(policy, QPOL_CAP_NEVERALLOW)) {
4ea9f2
-		ERR(policy, "%s", "Cannot get avrules: Neverallow rules requested but not available");
4ea9f2
-		errno = ENOTSUP;
4ea9f2
-		return STATUS_ERR;
4ea9f2
-	}
4ea9f2
-
4ea9f2
 	db = &policy->p->p;
4ea9f2
 
4ea9f2
 	state = calloc(1, sizeof(avtab_state_t));
4ea9f2
-- 
4ea9f2
2.9.4
4ea9f2