Bug 979662 - SELinux is preventing /usr/bin/systemctl from 'read' accesses on the file utmp.
Summary: SELinux is preventing /usr/bin/systemctl from 'read' accesses on the file utmp.
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 19
Hardware: x86_64
OS: Unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
Whiteboard: abrt_hash:dea2e050975368a8050fed4061b...
Depends On:
TreeView+ depends on / blocked
Reported: 2013-06-29 08:07 UTC by Leszek Matok
Modified: 2013-07-07 01:32 UTC (History)
4 users (show)

Fixed In Version: selinux-policy-3.12.1-59.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2013-07-07 01:32:36 UTC
Type: ---

Attachments (Terms of Use)

Description Leszek Matok 2013-06-29 08:07:15 UTC
Description of problem:
After updating gnome-power-manager to latest updates-testing version, it pulled ConsoleKit as a dependency and started working.

But I tested setting power button to shutdown instead of suspend and this is what happened.
SELinux is preventing /usr/bin/systemctl from 'read' accesses on the file utmp.

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

If you believe that systemctl should be allowed read 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.
allow this access for now by executing:
# grep shutdown /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:consolekit_t:s0
Target Context                system_u:object_r:initrc_var_run_t:s0
Target Objects                utmp [ file ]
Source                        shutdown
Source Path                   /usr/bin/systemctl
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-204-8.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-57.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.5-301.fc19.x86_64 #1 SMP Tue
                              Jun 11 19:39:38 UTC 2013 x86_64 x86_64
Alert Count                   3
First Seen                    2013-06-29 00:51:32 CEST
Last Seen                     2013-06-29 00:52:08 CEST
Local ID                      5a2532d6-f849-4bcb-9921-334a74f497a1

Raw Audit Messages
type=AVC msg=audit(1372459928.980:405): avc:  denied  { read } for  pid=1455 comm="shutdown" name="utmp" dev="tmpfs" ino=14680 scontext=system_u:system_r:consolekit_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file

type=SYSCALL msg=audit(1372459928.980:405): arch=x86_64 syscall=open success=no exit=EACCES a0=7fa570cd5de0 a1=80000 a2=7fa570cd5dd1 a3=0 items=0 ppid=1454 pid=1455 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=shutdown exe=/usr/bin/systemctl subj=system_u:system_r:consolekit_t:s0 key=(null)

Hash: shutdown,consolekit_t,initrc_var_run_t,file,read

Additional info:
reporter:       libreport-2.1.5
hashmarkername: setroubleshoot
kernel:         3.9.5-301.fc19.x86_64
type:           libreport

Comment 1 Fedora Update System 2013-07-03 19:49:38 UTC
selinux-policy-3.12.1-59.fc19 has been submitted as an update for Fedora 19.

Comment 2 Ronald Verbeek 2013-07-04 21:22:53 UTC
Description of problem:
Click Logout. click shutdown.

Additional info:
reporter:       libreport-2.1.5
hashmarkername: setroubleshoot
kernel:         3.9.8-300.fc19.i686
type:           libreport

Comment 3 Fedora Update System 2013-07-05 02:13:20 UTC
Package selinux-policy-3.12.1-59.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-59.fc19'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2013-07-07 01:32:36 UTC
selinux-policy-3.12.1-59.fc19 has been pushed to the Fedora 19 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.