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

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