Bug 949195 - 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.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 19
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:a7d990dee641895129ac3e522d3...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-07 00:42 UTC by Ed Greshko
Modified: 2013-04-19 05:56 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-04-19 05:56:56 UTC
Type: ---


Attachments (Terms of Use)

Description Ed Greshko 2013-04-07 00:42:10 UTC
Description of problem:
The failure occured during the verify phase of doing

yum groupinstall "Xfce Desktop"
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.
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                utmp [ file ]
Source                        runlevel
Source Path                   /usr/bin/systemctl
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-200-3.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-24.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.0-0.rc4.git0.1.fc19.x86_64 #1
                              SMP Mon Mar 25 02:31:02 UTC 2013 x86_64 x86_64
Alert Count                   4
First Seen                    2013-04-06 11:14:31 CST
Last Seen                     2013-04-07 08:38:47 CST
Local ID                      4b8f134b-32c9-46b1-a0a9-265617757f27

Raw Audit Messages
type=AVC msg=audit(1365295127.728:771): avc:  denied  { read } for  pid=11873 comm="runlevel" name="utmp" dev="tmpfs" ino=11974 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(1365295127.728:771): arch=x86_64 syscall=open success=no exit=EACCES a0=7f608f877de0 a1=80000 a2=7f608f877dd1 a3=7f60912ed060 items=0 ppid=11872 pid=11873 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,read

audit2allow

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

audit2allow -R
require {
	type abrt_t;
}

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


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

Potential duplicate: bug 928992

Comment 1 Ed Greshko 2013-04-07 00:44:11 UTC
  Verifying  : xfce4-datetime-plugin-0.6.2-1.fc19.x86_64                  133/133 
Traceback (most recent call last):
  File "/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 316, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 219, in main
    return_code = base.doTransaction()
  File "/usr/share/yum-cli/cli.py", line 697, in doTransaction
    resultobject = self.runTransaction(cb=cb)
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1763, in runTransaction
    self.igroups.save()
  File "/usr/lib/python2.7/site-packages/yum/igroups.py", line 148, in save
    self._write_grp_grps()
  File "/usr/lib/python2.7/site-packages/yum/igroups.py", line 175, in _write_grp_grps
    if self.groups[grpname].environment == evgrp.evgid:
KeyError: 'xfce-extra-plugins'

Comment 2 Miroslav Grepl 2013-04-08 09:10:49 UTC
Has been fixed.

Comment 3 Fedora Update System 2013-04-08 11:44:44 UTC
selinux-policy-3.12.1-28.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/FEDORA-2013-5045/selinux-policy-3.12.1-28.fc19

Comment 4 Fedora Update System 2013-04-08 15:57:41 UTC
Package selinux-policy-3.12.1-28.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-28.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-5045/selinux-policy-3.12.1-28.fc19
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2013-04-19 05:56:58 UTC
selinux-policy-3.12.1-28.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.