Bug 889214 - SELinux is preventing /usr/lib/systemd/systemd-logind from 'getattr' accesses on the directory /run/user/apache.
Summary: SELinux is preventing /usr/lib/systemd/systemd-logind from 'getattr' accesses...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 17
Hardware: i686
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:092b5138c010ef4aaab78eeba2b...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-20 14:16 UTC by geminic86
Modified: 2013-01-07 03:58 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-07 03:58:12 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description geminic86 2012-12-20 14:16:03 UTC
Description of problem:
SELinux is preventing /usr/lib/systemd/systemd-logind from 'getattr' accesses on the directory /run/user/apache.

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

If you believe that systemd-logind should be allowed getattr access on the apache directory by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep systemd-logind /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:systemd_logind_t:s0
Target Context                system_u:object_r:httpd_tmp_t:s0
Target Objects                /run/user/apache [ dir ]
Source                        systemd-logind
Source Path                   /usr/lib/systemd/systemd-logind
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-44-21.fc17.i686
Target RPM Packages           
Policy RPM                    selinux-policy-3.10.0-165.fc17.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.6.10-2.fc17.i686.PAEdebug #1 SMP
                              Tue Dec 11 18:21:45 UTC 2012 i686 i686
Alert Count                   8
First Seen                    2012-12-20 08:54:01 EST
Last Seen                     2012-12-20 09:15:01 EST
Local ID                      bde5fe02-83bf-4321-b65c-54837b6446ea

Raw Audit Messages
type=AVC msg=audit(1356012901.254:9244): avc:  denied  { getattr } for  pid=792 comm="systemd-logind" path="/run/user/apache" dev="tmpfs" ino=530121 scontext=system_u:system_r:systemd_logind_t:s0 tcontext=system_u:object_r:httpd_tmp_t:s0 tclass=dir


type=SYSCALL msg=audit(1356012901.254:9244): arch=i386 syscall=lstat64 success=no exit=EACCES a0=9e29248 a1=bfd07120 a2=4a618ff4 a3=1c0 items=0 ppid=1 pid=792 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=systemd-logind exe=/usr/lib/systemd/systemd-logind subj=system_u:system_r:systemd_logind_t:s0 key=(null)

Hash: systemd-logind,systemd_logind_t,httpd_tmp_t,dir,getattr

audit2allow

#============= systemd_logind_t ==============
allow systemd_logind_t httpd_tmp_t:dir getattr;

audit2allow -R

#============= systemd_logind_t ==============
allow systemd_logind_t httpd_tmp_t:dir getattr;


Additional info:
hashmarkername: setroubleshoot
kernel:         3.6.10-2.fc17.i686.PAEdebug
type:           libreport

Comment 1 Daniel Walsh 2012-12-20 14:51:15 UTC
Did you actually login to the machine as the apache user?

Comment 2 Daniel Walsh 2012-12-20 14:55:21 UTC
Just allowed read access on this in F18.

58e6409e4bbb0c1dbfd97f9bd600ab105fc50ef3

Comment 3 Miroslav Grepl 2012-12-27 09:03:33 UTC
Added to f17.

commit 3048b2b738af21f9bbf07c1405c2bcd21327824f
Author: Miroslav Grepl <mgrepl>
Date:   Thu Dec 27 10:02:08 2012 +0100

    systemd_logind_t is looking at all files under /run/user/apache

Comment 4 Fedora Update System 2013-01-03 13:06:14 UTC
selinux-policy-3.10.0-166.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/FEDORA-2012-20544/selinux-policy-3.10.0-166.fc17

Comment 5 Fedora Update System 2013-01-05 06:38:22 UTC
Package selinux-policy-3.10.0-166.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-166.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-20544/selinux-policy-3.10.0-166.fc17
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2013-01-07 03:58:13 UTC
selinux-policy-3.10.0-166.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.