|
|
5144c6 |
From 42dd1628a1211363c860917e474ecc5b9c1fdb84 Mon Sep 17 00:00:00 2001
|
|
|
5144c6 |
From: Alexander Bokovoy <abokovoy@redhat.com>
|
|
|
5144c6 |
Date: Thu, 2 Jul 2020 15:50:00 +0300
|
|
|
5144c6 |
Subject: [PATCH] selinux: allow oddjobd to set up ipa_helper_t context for
|
|
|
5144c6 |
execution
|
|
|
5144c6 |
|
|
|
5144c6 |
On Fedora 32+ and RHEL 8.3.0+ execution of ipa_helper_t context requires
|
|
|
5144c6 |
SELinux policy permission to use 'noatsecure'. This comes most likely
|
|
|
5144c6 |
from execve() setup by glibc.
|
|
|
5144c6 |
|
|
|
5144c6 |
Add SELinux interface ipa_helper_noatsecure() that can be called by
|
|
|
5144c6 |
oddjob's SELinux policy definition.
|
|
|
5144c6 |
|
|
|
5144c6 |
In addition, if ipa_helper_t runs ipa-getkeytab, libkrb5 will attempt to
|
|
|
5144c6 |
access SELinux configuration and produce AVC for that. Allow reading
|
|
|
5144c6 |
general userspace SELinux configuration.
|
|
|
5144c6 |
|
|
|
5144c6 |
Fixes: https://pagure.io/freeipa/issue/8395
|
|
|
5144c6 |
Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
|
|
|
5144c6 |
Reviewed-By: Christian Heimes <cheimes@redhat.com>
|
|
|
5144c6 |
---
|
|
|
5144c6 |
selinux/ipa.if | 18 ++++++++++++++++++
|
|
|
5144c6 |
selinux/ipa.te | 1 +
|
|
|
5144c6 |
2 files changed, 19 insertions(+)
|
|
|
5144c6 |
|
|
|
5144c6 |
diff --git a/selinux/ipa.if b/selinux/ipa.if
|
|
|
5144c6 |
index ea971b8fa..783db8b78 100644
|
|
|
5144c6 |
--- a/selinux/ipa.if
|
|
|
5144c6 |
+++ b/selinux/ipa.if
|
|
|
5144c6 |
@@ -419,3 +419,21 @@ ifndef(`dirsrv_systemctl',`
|
|
|
5144c6 |
ps_process_pattern($1, dirsrv_t)
|
|
|
5144c6 |
')
|
|
|
5144c6 |
')
|
|
|
5144c6 |
+
|
|
|
5144c6 |
+
|
|
|
5144c6 |
+########################################
|
|
|
5144c6 |
+## <summary>
|
|
|
5144c6 |
+## Allow ipa_helper noatsecure
|
|
|
5144c6 |
+## </summary>
|
|
|
5144c6 |
+## <param name="domain">
|
|
|
5144c6 |
+## <summary>
|
|
|
5144c6 |
+## Domain allowed access.
|
|
|
5144c6 |
+## </summary>
|
|
|
5144c6 |
+## </param>
|
|
|
5144c6 |
+#
|
|
|
5144c6 |
+interface(`ipa_helper_noatsecure',`
|
|
|
5144c6 |
+ gen_require(`
|
|
|
5144c6 |
+ type ipa_helper_t;
|
|
|
5144c6 |
+ ')
|
|
|
5144c6 |
+ allow $1 ipa_helper_t:process { noatsecure };
|
|
|
5144c6 |
+')
|
|
|
5144c6 |
diff --git a/selinux/ipa.te b/selinux/ipa.te
|
|
|
5144c6 |
index 587e5e585..383979094 100644
|
|
|
5144c6 |
--- a/selinux/ipa.te
|
|
|
5144c6 |
+++ b/selinux/ipa.te
|
|
|
5144c6 |
@@ -115,6 +115,7 @@ optional_policy(`
|
|
|
5144c6 |
|
|
|
5144c6 |
|
|
|
5144c6 |
allow ipa_helper_t self:capability { net_admin dac_read_search dac_override chown };
|
|
|
5144c6 |
+seutil_read_config(ipa_helper_t);
|
|
|
5144c6 |
|
|
|
5144c6 |
#kernel bug
|
|
|
5144c6 |
dontaudit ipa_helper_t self:capability2 block_suspend;
|
|
|
5144c6 |
--
|
|
|
5144c6 |
2.26.2
|
|
|
5144c6 |
|
|
|
5144c6 |
From 0d70addbbf2a99e7398a518bc98d5fe109469bb5 Mon Sep 17 00:00:00 2001
|
|
|
5144c6 |
From: Alexander Bokovoy <abokovoy@redhat.com>
|
|
|
5144c6 |
Date: Fri, 3 Jul 2020 17:20:49 +0300
|
|
|
5144c6 |
Subject: [PATCH] selinux: support running ipa-custodia with PrivateTmp=yes
|
|
|
5144c6 |
|
|
|
5144c6 |
Related: https://pagure.io/freeipa/issue/8395
|
|
|
5144c6 |
Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
|
|
|
5144c6 |
Reviewed-By: Christian Heimes <cheimes@redhat.com>
|
|
|
5144c6 |
---
|
|
|
5144c6 |
selinux/ipa.te | 4 ++++
|
|
|
5144c6 |
1 file changed, 4 insertions(+)
|
|
|
5144c6 |
|
|
|
5144c6 |
diff --git a/selinux/ipa.te b/selinux/ipa.te
|
|
|
5144c6 |
index 383979094..a3381217a 100644
|
|
|
5144c6 |
--- a/selinux/ipa.te
|
|
|
5144c6 |
+++ b/selinux/ipa.te
|
|
|
5144c6 |
@@ -390,3 +390,7 @@ optional_policy(`
|
|
|
5144c6 |
sssd_search_lib(ipa_custodia_t)
|
|
|
5144c6 |
sssd_stream_connect(ipa_custodia_t)
|
|
|
5144c6 |
')
|
|
|
5144c6 |
+
|
|
|
5144c6 |
+optional_policy(`
|
|
|
5144c6 |
+ systemd_private_tmp(ipa_custodia_tmp_t)
|
|
|
5144c6 |
+')
|
|
|
5144c6 |
--
|
|
|
5144c6 |
2.26.2
|
|
|
5144c6 |
|