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

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