Bug 1398789

Summary: SELinux is preventing sssd from 'write' accesses on the directory /etc/sssd.
Product: [Fedora] Fedora Reporter: bedny
Component: sssdAssignee: Jakub Hrozek <jhrozek>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: abokovoy, dominick.grift, dwalsh, jhrozek, lslebodn, lvrabec, mgrepl, mzidek, pbrezina, plautrba, pmoore, preichl, rharwood, sbose, ssekidde, ssorce
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:429ca6355e6fab219418bd7cf8337ae348233e8c49776d4865dc89c793d437f7;VARIANT_ID=workstation;
Fixed In Version: sssd-1.14.2-2.fc23 sssd-1.14.2-2.fc25 sssd-1.14.2-2.fc24 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-17 00:23:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description bedny 2016-11-26 01:48:18 UTC
Description of problem:
SELinux is preventing sssd from 'write' accesses on the directory /etc/sssd.

*****  Plugin catchall (100. confidence) suggests   **************************

If вы считаете, что sssd следует разрешить доступ write к sssd directory по умолчанию.
Then рекомендуется создать отчет об ошибке.
Чтобы разрешить доступ, можно создать локальный модуль политики.
Do
allow this access for now by executing:
# ausearch -c 'sssd' --raw | audit2allow -M my-sssd
# semodule -X 300 -i my-sssd.pp

Additional Information:
Source Context                system_u:system_r:sssd_t:s0
Target Context                system_u:object_r:sssd_conf_t:s0
Target Objects                /etc/sssd [ dir ]
Source                        sssd
Source Path                   sssd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           sssd-common-1.14.2-1.fc25.x86_64
Policy RPM                    selinux-policy-3.13.1-224.fc25.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.8.8-300.fc25.x86_64 #1 SMP Tue
                              Nov 15 18:10:06 UTC 2016 x86_64 x86_64
Alert Count                   2
First Seen                    2016-11-26 04:38:55 MSK
Last Seen                     2016-11-26 04:45:05 MSK
Local ID                      e7274741-2766-4361-ad54-34ef8b11bbcc

Raw Audit Messages
type=AVC msg=audit(1480124705.132:396): avc:  denied  { write } for  pid=13612 comm="sssd" name="sssd" dev="sda1" ino=108958 scontext=system_u:system_r:sssd_t:s0 tcontext=system_u:object_r:sssd_conf_t:s0 tclass=dir permissive=0


Hash: sssd,sssd_t,sssd_conf_t,dir,write

Version-Release number of selected component:
selinux-policy-3.13.1-224.fc25.noarch

Additional info:
reporter:       libreport-2.8.0
hashmarkername: setroubleshoot
kernel:         4.8.8-300.fc25.x86_64
type:           libreport

Comment 1 Daniel Walsh 2016-11-28 17:47:59 UTC
What is sssd trying to write in its config directory?

Comment 2 Lukas Slebodnik 2016-11-28 17:58:40 UTC
It is a known problem if there isn't any sssd.conf. SSSD tries to copy default one from /usr/share/doc/sssd-common/sssd-example.conf. I do not think it's best idea and it's possible that we will change the behaviour due to files provider.

I will revert the change in sssd.

Comment 3 Daniel Walsh 2016-11-28 18:11:26 UTC
Why not put the check in the unit file as a pre start script?

Comment 4 Lukas Slebodnik 2016-11-28 18:16:33 UTC
Stethen Gallagher wrote this feature.
But IMHO, it would be much simpler to ship default configuration directly in /etc/sssd/sssd.conf rather then copy it from some location. But as I already wrote it is very likely that behaviour might change due to https://fedoraproject.org/wiki/Changes/SSSDCacheForLocalUsers

Comment 5 Jakub Hrozek 2016-11-29 11:19:46 UTC
(In reply to Lukas Slebodnik from comment #4)
> Stethen Gallagher wrote this feature.
> But IMHO, it would be much simpler to ship default configuration directly in
> /etc/sssd/sssd.conf rather then copy it from some location. But as I already
> wrote it is very likely that behaviour might change due to
> https://fedoraproject.org/wiki/Changes/SSSDCacheForLocalUsers

Yes, this is what I'm discussing with Florian and Stephen at the moment. I actually think we should just default to running the files provider, always.

Comment 6 Fedora Update System 2016-12-13 20:07:36 UTC
sssd-1.14.2-2.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-66bc868b6e

Comment 7 Fedora Update System 2016-12-13 20:09:49 UTC
sssd-1.14.2-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-b04d690b49

Comment 8 Fedora Update System 2016-12-13 20:11:40 UTC
sssd-1.14.2-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-b0d27da617

Comment 9 Fedora Update System 2016-12-15 02:28:02 UTC
sssd-1.14.2-2.fc23 has been pushed to the Fedora 23 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-2016-b0d27da617

Comment 10 Fedora Update System 2016-12-15 05:02:52 UTC
sssd-1.14.2-2.fc24 has been pushed to the Fedora 24 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-2016-b04d690b49

Comment 11 Fedora Update System 2016-12-15 05:06:17 UTC
sssd-1.14.2-2.fc25 has been pushed to the Fedora 25 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-2016-66bc868b6e

Comment 12 Fedora Update System 2016-12-17 00:23:35 UTC
sssd-1.14.2-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2016-12-19 23:22:30 UTC
sssd-1.14.2-2.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2016-12-22 18:18:01 UTC
sssd-1.14.2-2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.