Bug 730478 - SELinux is preventing /sbin/setfiles from 'open' accesses on the file mock-selinux-plugin.qJ7X4g.
Summary: SELinux is preventing /sbin/setfiles from 'open' accesses on the file mock-se...
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 15
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
Whiteboard: setroubleshoot_trace_hash:f76cd2e5e17...
Depends On:
TreeView+ depends on / blocked
Reported: 2011-08-13 13:24 UTC by Richard Shaw
Modified: 2012-08-07 19:21 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2012-08-07 19:21:09 UTC

Attachments (Terms of Use)

Description Richard Shaw 2011-08-13 13:24:08 UTC
SELinux is preventing /sbin/setfiles from 'open' accesses on the file mock-selinux-plugin.qJ7X4g.

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

If you believe that setfiles should be allowed open access on the mock-selinux-plugin.qJ7X4g 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 restorecon /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:setfiles_t:s0-s0:c0.c102
Target Context                unconfined_u:object_r:user_tmp_t:s0
Target Objects                mock-selinux-plugin.qJ7X4g [ file ]
Source                        restorecon
Source Path                   /sbin/setfiles
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           policycoreutils-2.0.86-7.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-35.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 2.6.40-4.fc15.x86_64 #1
                              SMP Fri Jul 29 18:46:53 UTC 2011 x86_64 x86_64
Alert Count                   1
First Seen                    Fri 12 Aug 2011 08:41:19 AM CDT
Last Seen                     Fri 12 Aug 2011 08:41:19 AM CDT
Local ID                      8320a64c-bfd7-4bb0-956e-513199b2d22e

Raw Audit Messages
type=AVC msg=audit(1313156479.486:193): avc:  denied  { open } for  pid=12762 comm="restorecon" name="mock-selinux-plugin.qJ7X4g" dev=dm-0 ino=1046876 scontext=unconfined_u:unconfined_r:setfiles_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_tmp_t:s0 tclass=file

type=SYSCALL msg=audit(1313156479.486:193): arch=x86_64 syscall=open success=yes exit=ESRCH a0=7fc860097218 a1=0 a2=1b6 a3=9 items=0 ppid=12760 pid=12762 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=2 comm=restorecon exe=/sbin/setfiles subj=unconfined_u:unconfined_r:setfiles_t:s0-s0:c0.c1023 key=(null)

Hash: restorecon,setfiles_t,user_tmp_t,file,open


#============= setfiles_t ==============
allow setfiles_t user_tmp_t:file open;

audit2allow -R

#============= setfiles_t ==============
allow setfiles_t user_tmp_t:file open;

Comment 1 Richard Shaw 2011-08-13 13:29:13 UTC
I should have tried a restorecon first, sorry. I have noticed though that I'm getting a number of selinux denials for files in /tmp... Am I the only one having these problems?

Comment 2 Daniel Walsh 2011-08-15 11:06:59 UTC
I am not sure, what is the mock-selinux-plugin?

What were you doing when this happened?

Comment 3 Richard Shaw 2011-08-15 13:09:24 UTC
(In reply to comment #2)
> I am not sure, what is the mock-selinux-plugin?

I don't know, must be part of the mock package. I assume you're familiar with mock?

> What were you doing when this happened?

Building packages with mock, however, I have noticed several instances of apps not being allowed to access what looks like to be their own temporary files. I don't think this is limited to mock. Maybe I need to restorecon on /tmp?


Comment 4 Daniel Walsh 2011-08-16 11:38:43 UTC
Well restorecon of /tmp will not do much since, we don't know what labels could/should be in /tmp.  A better idea would be to remove all files/directories from /tmp and reboot and see if the problems go away.  I usually run with tmpfs on /tmp in order to prevent cruft from building up.  

Yes I know what mock is, and have done some work to make it run better on an SELinux system.  I just did not recognize mock-selinux-plugin, I guess I have to add this to my list of investigations.

Comment 5 Fedora End Of Life 2012-08-07 19:21:11 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

The process we are following is described here:

Note You need to log in before you can comment on or make changes to this bug.