Bug 849567 - Need update of selinux policy related to SSSD
Need update of selinux policy related to SSSD
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
17
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
:
Depends On: 843730
Blocks: 843814 848751
  Show dependency treegraph
 
Reported: 2012-08-20 04:31 EDT by Miroslav Grepl
Modified: 2012-08-27 19:04 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 843730
Environment:
Last Closed: 2012-08-27 19:04:10 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Miroslav Grepl 2012-08-20 04:31:44 EDT
+++ This bug was initially created as a clone of Bug #843730 +++

In SSSD there is a new feature which writes SSSD config files into /etc/selinux/<policy>/logins/ for SELinux PAM module which then uses this information to set correct context for remote user logging in.

I'd like to ask for update of SELinux policy so SSSD can write into this directory. I've set permissive mode on my machine, tried to log in several times and these are the rules that audit2allow returned:

allow sssd_t selinux_config_t:dir { write remove_name add_name };
allow sssd_t selinux_config_t:file { write rename create unlink };

Please note that we don't write directly to final config files but we rather use mkstemp-style temporary files which are then renamed to the final name.

--- Additional comment from jzeleny@redhat.com on 2012-07-27 04:12:27 EDT ---

There is one mistake in my initial description. SSSD of course writes SELinux config files into /etc/selinux/<policy>/logins/, not SSSD config files.

--- Additional comment from dwalsh@redhat.com on 2012-07-31 11:59:37 EDT ---

We need a new label for the logins directory and then allowd sssd to write there.

--- Additional comment from mgrepl@redhat.com on 2012-07-31 18:22:16 EDT ---

How about selinux_login_conf_t?

--- Additional comment from dwalsh@redhat.com on 2012-08-01 15:44:11 EDT ---

Fine.

--- Additional comment from mgrepl@redhat.com on 2012-08-07 09:33:19 EDT ---

I have just added fixes. It is going to be in today's build.

--- Additional comment from jhrozek@redhat.com on 2012-08-16 05:20:34 EDT ---

(In reply to comment #5)
> I have just added fixes. It is going to be in today's build.

Miroslav, can you please back port the changes to Fedora 17, too?
Comment 1 Fedora Update System 2012-08-20 09:10:32 EDT
selinux-policy-3.10.0-146.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-146.fc17
Comment 2 Scott Poore 2012-08-20 14:53:55 EDT
FYI, this is what I was seeing when I ran into this failure during FreeIPA Replica installs (from ipa-replica-conncheck's ssh check):

[root@vm1 pam.d]# ausearch -m avc -ts 22:03
----
time->Wed Aug 15 22:03:11 2012
type=SYSCALL msg=audit(1345082591.538:444): arch=c000003e syscall=2 success=no exit=-13 a0=18f3550 a1=c2 a2=180 a3=350286760de items=0 ppid=3409 pid=3413 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="sssd_pam" exe="/usr/libexec/sssd/sssd_pam" subj=system_u:system_r:sssd_t:s0 key=(null)
type=AVC msg=audit(1345082591.538:444): avc:  denied  { write } for  pid=3413 comm="sssd_pam" name="logins" dev="dm-1" ino=155142 scontext=system_u:system_r:sssd_t:s0 tcontext=system_u:object_r:selinux_config_t:s0 tclass=dir

[root@vm1 pam.d]# find / -inum 155142
/etc/selinux/targeted/logins

[root@vm1 pam.d]# matchpathcon /etc/selinux/targeted/logins
/etc/selinux/targeted/logins        system_u:object_r:selinux_config_t:s0

[root@vm1 pam.d]# sesearch -s sssd_t -t selinux_config_t --allow
Found 2 semantic av rules:
   allow sssd_t selinux_config_t : dir { getattr search open } ;
   allow sssd_t selinux_config_t : dir { getattr search open } ;


After the update provided, I'm no longer seeing AVC denials during FreeIPA Replica installs.
Comment 3 Fedora Update System 2012-08-21 05:51:04 EDT
Package selinux-policy-3.10.0-146.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.10.0-146.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-12355/selinux-policy-3.10.0-146.fc17
then log in and leave karma (feedback).
Comment 4 Fedora Update System 2012-08-27 19:04:10 EDT
selinux-policy-3.10.0-146.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.