Blame SOURCES/0008-Add-missing-SELinux-rule-for-ipa-custodia.sock_rhbz#1857157.patch

91acb2
From d83b760d1f76a3ba8e527dd27551e51a600b22c0 Mon Sep 17 00:00:00 2001
91acb2
From: Christian Heimes <cheimes@redhat.com>
91acb2
Date: Wed, 15 Jul 2020 10:23:35 +0200
91acb2
Subject: [PATCH] Add missing SELinux rule for ipa-custodia.sock
91acb2
91acb2
A SELinux rule for ipa_custodia_stream_connect(httpd_t) was not copied
91acb2
from upstream rules. It breaks installations on systems that don't have
91acb2
ipa_custodia_stream_connect in SELinux domain for apache, e.g. RHEL 8.3.
91acb2
91acb2
Fixes: https://pagure.io/freeipa/issue/8412
91acb2
Signed-off-by: Christian Heimes <cheimes@redhat.com>
91acb2
Reviewed-By: Thomas Woerner <twoerner@redhat.com>
91acb2
---
91acb2
 selinux/ipa.te | 7 +++++++
91acb2
 1 file changed, 7 insertions(+)
91acb2
91acb2
diff --git a/selinux/ipa.te b/selinux/ipa.te
91acb2
index a3381217a4..c4c3fa805e 100644
91acb2
--- a/selinux/ipa.te
91acb2
+++ b/selinux/ipa.te
91acb2
@@ -378,6 +378,13 @@ optional_policy(`
91acb2
 	ipa_search_lib(ipa_custodia_t)
91acb2
 ')
91acb2
 
91acb2
+optional_policy(`
91acb2
+    gen_require(`
91acb2
+        type httpd_t;
91acb2
+    ')
91acb2
+    ipa_custodia_stream_connect(httpd_t)
91acb2
+')
91acb2
+
91acb2
 optional_policy(`
91acb2
 	pki_manage_tomcat_etc_rw(ipa_custodia_t)
91acb2
 	pki_read_tomcat_cert(ipa_custodia_t)