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

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