Bug 951085

Summary: SELinux is preventing /usr/bin/login from 'getattr' accesses on the directory /run/systemd/system.
Product: [Fedora] Fedora Reporter: Rex Dieter <rdieter>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: dominick.grift, dwalsh, mgrepl, sangu.fedora, tchollingsworth
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:ce0d07c17a3a5593fd8110773c0e7bc7d9e9f5875175bf7676c89832ee9d35b0
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-20 20:08:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Rex Dieter 2013-04-11 12:46:28 UTC
Description of problem:
just booted, logged in with kdm, then into vt2 console session too.
SELinux is preventing /usr/bin/login from 'getattr' accesses on the directory /run/systemd/system.

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

If you believe that login should be allowed getattr access on the system 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 login /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:local_login_t:s0-s0:c0.c1023
Target Context                system_u:object_r:systemd_unit_file_t:s0
Target Objects                /run/systemd/system [ dir ]
Source                        login
Source Path                   /usr/bin/login
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           util-linux-2.23-0.3.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-28.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.0-0.rc6.git0.1.fc19.x86_64 #1
                              SMP Mon Apr 8 15:47:32 UTC 2013 x86_64 x86_64
Alert Count                   2
First Seen                    2013-04-11 07:40:45 CDT
Last Seen                     2013-04-11 07:42:14 CDT
Local ID                      b06986b1-e0c2-48fe-aa0a-c18b8e40fc4d

Raw Audit Messages
type=AVC msg=audit(1365684134.915:419): avc:  denied  { getattr } for  pid=1056 comm="login" path="/run/systemd/system" dev="tmpfs" ino=6410 scontext=system_u:system_r:local_login_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_unit_file_t:s0 tclass=dir


type=SYSCALL msg=audit(1365684134.915:419): arch=x86_64 syscall=lstat success=no exit=EACCES a0=3dae601b59 a1=7fff61c505f0 a2=7fff61c505f0 a3=0 items=0 ppid=1 pid=1056 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=1 tty=tty2 comm=login exe=/usr/bin/login subj=system_u:system_r:local_login_t:s0-s0:c0.c1023 key=(null)

Hash: login,local_login_t,systemd_unit_file_t,dir,getattr

audit2allow

#============= local_login_t ==============
allow local_login_t systemd_unit_file_t:dir getattr;

audit2allow -R
require {
	type systemd_unit_file_t;
	type local_login_t;
	class dir getattr;
}

#============= local_login_t ==============
allow local_login_t systemd_unit_file_t:dir getattr;


Additional info:
hashmarkername: setroubleshoot
kernel:         3.9.0-0.rc6.git0.1.fc19.x86_64
type:           libreport

Comment 1 sangu 2013-04-11 12:51:20 UTC
Description of problem:
While entering console with alt + ctrl + f2

Additional info:
hashmarkername: setroubleshoot
kernel:         3.9.0-0.rc6.git0.1.fc19.x86_64
type:           libreport

Comment 2 Daniel Walsh 2013-04-11 18:58:02 UTC
Fixed in selinux-policy-3.12.1-29.fc19.noarch

Comment 3 Fedora Update System 2013-04-16 11:35:24 UTC
selinux-policy-3.12.1-31.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-31.fc19

Comment 4 Fedora Update System 2013-04-16 16:14:59 UTC
Package selinux-policy-3.12.1-31.fc19:
* should fix your issue,
* was pushed to the Fedora 19 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.12.1-31.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-5812/selinux-policy-3.12.1-31.fc19
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2013-04-20 20:08:29 UTC
selinux-policy-3.12.1-31.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.