Bug 951281 - SELinux is preventing /usr/bin/systemctl from 'lock' accesses on the file /run/utmp.
Summary: SELinux is preventing /usr/bin/systemctl from 'lock' accesses on the file /ru...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 18
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:c237f5fe5823e020dd37e014d0d...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-12 00:11 UTC by Rob K
Modified: 2013-04-18 02:52 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-04-18 02:52:25 UTC


Attachments (Terms of Use)

Description Rob K 2013-04-12 00:11:34 UTC
Description of problem:
SELinux is preventing /usr/bin/systemctl from 'lock' accesses on the file /run/utmp.

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

If you believe that systemctl should be allowed lock access on the utmp file 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 runlevel /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:abrt_t:s0-s0:c0.c1023
Target Context                system_u:object_r:initrc_var_run_t:s0
Target Objects                /run/utmp [ file ]
Source                        runlevel
Source Path                   /usr/bin/systemctl
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-197-1.fc18.2.x86_64
Target RPM Packages           initscripts-9.42.2-3.fc18.x86_64
Policy RPM                    selinux-policy-3.11.1-87.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.8.6-203.fc18.x86_64 #1 SMP Tue
                              Apr 9 19:33:01 UTC 2013 x86_64 x86_64
Alert Count                   2
First Seen                    2013-04-12 10:07:51 EST
Last Seen                     2013-04-12 10:08:55 EST
Local ID                      23be0ea9-018a-4237-9b4f-7958a648ecb4

Raw Audit Messages
type=AVC msg=audit(1365725335.674:348): avc:  denied  { lock } for  pid=2414 comm="runlevel" path="/run/utmp" dev="tmpfs" ino=15853 scontext=system_u:system_r:abrt_t:s0-s0:c0.c1023 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file


type=SYSCALL msg=audit(1365725335.674:348): arch=x86_64 syscall=fcntl success=yes exit=0 a0=3 a1=7 a2=7fffc02229e0 a3=8 items=0 ppid=2413 pid=2414 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=runlevel exe=/usr/bin/systemctl subj=system_u:system_r:abrt_t:s0-s0:c0.c1023 key=(null)

Hash: runlevel,abrt_t,initrc_var_run_t,file,lock

audit2allow

#============= abrt_t ==============
allow abrt_t initrc_var_run_t:file lock;

audit2allow -R
require {
	type abrt_t;
}

#============= abrt_t ==============
init_read_utmp(abrt_t)


Additional info:
hashmarkername: setroubleshoot
kernel:         3.8.6-203.fc18.x86_64
type:           libreport

Potential duplicate: bug 928989

Comment 1 Miroslav Grepl 2013-04-15 05:43:23 UTC
Fixed in -89.fc18 release.

http://koji.fedoraproject.org/koji/buildinfo?buildID=409979

A new F18 update is coming today.

Comment 2 Fedora Update System 2013-04-15 11:12:25 UTC
selinux-policy-3.11.1-90.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-90.fc18

Comment 3 Fedora Update System 2013-04-16 00:07:54 UTC
Package selinux-policy-3.11.1-90.fc18:
* should fix your issue,
* was pushed to the Fedora 18 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.11.1-90.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-5742/selinux-policy-3.11.1-90.fc18
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2013-04-18 02:52:27 UTC
selinux-policy-3.11.1-90.fc18 has been pushed to the Fedora 18 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.