selinux: allow oddjobd to set up ipa_helper_t context for execution

On Fedora 32+ and RHEL 8.3.0+ execution of ipa_helper_t context requires
SELinux policy permission to use 'noatsecure'. This comes most likely
from execve() setup by glibc.

Add SELinux interface ipa_helper_noatsecure() that can be called by
oddjob's SELinux policy definition.

In addition, if ipa_helper_t runs ipa-getkeytab, libkrb5 will attempt to
access SELinux configuration and produce AVC for that. Allow reading
general userspace SELinux configuration.

Fixes: https://pagure.io/freeipa/issue/8395
Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
Alexander Bokovoy 2020-07-02 15:50:00 +03:00
parent 630c408f9e
commit f6055e6c9f
2 changed files with 19 additions and 0 deletions

View File

@ -419,3 +419,21 @@ ifndef(`dirsrv_systemctl',`
ps_process_pattern($1, dirsrv_t) ps_process_pattern($1, dirsrv_t)
') ')
') ')
########################################
## <summary>
## Allow ipa_helper noatsecure
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`ipa_helper_noatsecure',`
gen_require(`
type ipa_helper_t;
')
allow $1 ipa_helper_t:process { noatsecure };
')

View File

@ -115,6 +115,7 @@ optional_policy(`
allow ipa_helper_t self:capability { net_admin dac_read_search dac_override chown }; allow ipa_helper_t self:capability { net_admin dac_read_search dac_override chown };
seutil_read_config(ipa_helper_t);
#kernel bug #kernel bug
dontaudit ipa_helper_t self:capability2 block_suspend; dontaudit ipa_helper_t self:capability2 block_suspend;