Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1150274

Summary: SELinux prevents portreserve from writing to /var/lib/sss/pipes/nss socket
Product: Red Hat Enterprise Linux 7 Reporter: Milos Malik <mmalik>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1   
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.13.1-5.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 10:45:40 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 Milos Malik 2014-10-07 19:15:19 UTC
Description of problem:

Version-Release number of selected component (if applicable):
portreserve-0.0.5-10.el7.x86_64
selinux-policy-3.13.1-2.el7.noarch
selinux-policy-devel-3.13.1-2.el7.noarch
selinux-policy-doc-3.13.1-2.el7.noarch
selinux-policy-minimum-3.13.1-2.el7.noarch
selinux-policy-mls-3.13.1-2.el7.noarch
selinux-policy-sandbox-3.13.1-2.el7.noarch
selinux-policy-targeted-3.13.1-2.el7.noarch

How reproducible:
always

Steps to Reproduce:
1. get a RHEL-7.1 machine with active targeted policy
2. install the portreserve, sssd and spamassassin packages
3. start the sssd service
4. start the portreserve services
5. search for AVCs

Actual results (enforcing mode):
----
type=PATH msg=audit(10/07/2014 20:55:58.185:963) : item=0 name=(null) inode=26837677 dev=fd:03 mode=socket,666 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:sssd_var_lib_t:s0 objtype=NORMAL 
type=SOCKADDR msg=audit(10/07/2014 20:55:58.185:963) : saddr=local /var/lib/sss/pipes/nss 
type=SYSCALL msg=audit(10/07/2014 20:55:58.185:963) : arch=x86_64 syscall=connect success=no exit=-13(Permission denied) a0=0x5 a1=0x7fffb15bc720 a2=0x6e a3=0x7f815e8e2220 items=1 ppid=1 pid=11044 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=portreserve exe=/usr/sbin/portreserve subj=system_u:system_r:portreserve_t:s0 key=(null) 
type=AVC msg=audit(10/07/2014 20:55:58.185:963) : avc:  denied  { write } for  pid=11044 comm=portreserve name=nss dev="vda3" ino=26837677 scontext=system_u:system_r:portreserve_t:s0 tcontext=system_u:object_r:sssd_var_lib_t:s0 tclass=sock_file 
----

Actual results (permissive mode):
----
type=PATH msg=audit(10/07/2014 20:58:06.026:996) : item=0 name=(null) inode=26837677 dev=fd:03 mode=socket,666 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:sssd_var_lib_t:s0 objtype=NORMAL 
type=SOCKADDR msg=audit(10/07/2014 20:58:06.026:996) : saddr=local /var/lib/sss/pipes/nss 
type=SYSCALL msg=audit(10/07/2014 20:58:06.026:996) : arch=x86_64 syscall=connect success=yes exit=0 a0=0x4 a1=0x7fffac9d0220 a2=0x6e a3=0x7fffac9cff40 items=1 ppid=1 pid=18789 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=portreserve exe=/usr/sbin/portreserve subj=system_u:system_r:portreserve_t:s0 key=(null) 
type=AVC msg=audit(10/07/2014 20:58:06.026:996) : avc:  denied  { connectto } for  pid=18789 comm=portreserve path=/var/lib/sss/pipes/nss scontext=system_u:system_r:portreserve_t:s0 tcontext=system_u:system_r:sssd_t:s0 tclass=unix_stream_socket 
type=AVC msg=audit(10/07/2014 20:58:06.026:996) : avc:  denied  { write } for  pid=18789 comm=portreserve name=nss dev="vda3" ino=26837677 scontext=system_u:system_r:portreserve_t:s0 tcontext=system_u:object_r:sssd_var_lib_t:s0 tclass=sock_file 
----

Expected results:
 * no AVCs

Comment 1 Miroslav Grepl 2014-10-13 09:46:07 UTC
commit dfa56fb4e279d38c0e56eab2bebad9c48afccdb5
Author: Miroslav Grepl <mgrepl>
Date:   Mon Oct 13 11:45:44 2014 +0200

    Add auth_use_nsswitch for portreserve to make it working with sssd.

Comment 5 errata-xmlrpc 2015-03-05 10:45:40 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0458.html