Bug 1460699

Summary: add ability for svirt_t to read files labelled with sssd_public_t
Product: [Fedora] Fedora Reporter: Alexander Bokovoy <abokovoy>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: dominick.grift, dwalsh, lvrabec, mgrepl, plautrba, pmoore, ssekidde
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: selinux-policy-3.13.1-259.fc26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-26 19:13:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alexander Bokovoy 2017-06-12 12:26:36 UTC
In order to allow qemu to authenticate SPICE connections with SASL GSSAPI when SSSD is in use, one needs to make sure svirt_t processes are allowed to read files in /var/lib/sss/pubconf/krb5.conf.d/.

Right now only ability to read the directory in question is allowed:
[pid  4018] open("/var/lib/sss/pubconf/krb5.include.d/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 32
[pid  4018] open("/var/lib/sss/pubconf/krb5.include.d//domain_realm_example_com", O_RDONLY) = -1 EACCES (Permission denied)

# sesearch -A -s svirt_t|grep sssd
allow svirt_t sssd_public_t:dir read;

We need also rules to allow reading files:

# echo "(allow svirt_t sssd_public_t (file (read getattr open)))" > my-local-rule.cil && semodule -i my-local-rule.cil

After adding this temporary rule svirt_t process can complete initializing libkrb5 and offer SASL GSSAPI to its clients.

Comment 1 Lukas Vrabec 2017-06-12 13:47:13 UTC
Alexander, 

I added changes into Rawhide, F26 and F25

Comment 2 Alexander Bokovoy 2017-06-12 14:19:54 UTC
Thank you, Lukas.

Comment 3 Fedora Update System 2017-06-23 18:12:15 UTC
selinux-policy-3.13.1-259.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-7b51a015cb

Comment 4 Fedora Update System 2017-06-25 01:19:59 UTC
selinux-policy-3.13.1-259.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-7b51a015cb

Comment 5 Fedora Update System 2017-06-26 19:13:13 UTC
selinux-policy-3.13.1-259.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.