Bug 732712

Summary: SELinux is preventing /sbin/setfiles from 'getattr' accesses on the filesystem /sys.
Product: [Fedora] Fedora Reporter: avignon <anselme.vignon>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: alirohman, dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:6bbb4486595f964680d6edd968c1412a708eac2deb3108be99df74dbdd8d344b
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-23 13:36:43 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 avignon 2011-08-23 11:06:20 UTC
SELinux is preventing /sbin/setfiles from 'getattr' accesses on the filesystem /sys.

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

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

Additional Information:
Source Context                unconfined_u:system_r:setfiles_t:s0-s0:c0.c1023
Target Context                system_u:object_r:sysfs_t:s0
Target Objects                /sys [ filesystem ]
Source                        restorecon
Source Path                   /sbin/setfiles
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           policycoreutils-2.0.86-7.fc15
Target RPM Packages           filesystem-2.4.41-1.fc15
Policy RPM                    selinux-policy-3.9.16-38.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 2.6.40.3-0.fc15.i686 #1 SMP
                              Tue Aug 16 04:24:09 UTC 2011 i686 i686
Alert Count                   2
First Seen                    Tue 23 Aug 2011 01:02:06 PM CEST
Last Seen                     Tue 23 Aug 2011 01:03:29 PM CEST
Local ID                      b4687904-7ad2-4918-807d-414f27aaff2a

Raw Audit Messages
type=AVC msg=audit(1314097409.354:119): avc:  denied  { getattr } for  pid=5736 comm="restorecon" name="/" dev=sysfs ino=1 scontext=unconfined_u:system_r:setfiles_t:s0-s0:c0.c1023 tcontext=system_u:object_r:sysfs_t:s0 tclass=filesystem


type=SYSCALL msg=audit(1314097409.354:119): arch=i386 syscall=statfs64 success=yes exit=0 a0=5bd9e7 a1=54 a2=bfe2394c a3=5bd9e7 items=0 ppid=5664 pid=5736 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=1 comm=restorecon exe=/sbin/setfiles subj=unconfined_u:system_r:setfiles_t:s0-s0:c0.c1023 key=(null)

Hash: restorecon,setfiles_t,sysfs_t,filesystem,getattr

audit2allow

#============= setfiles_t ==============
allow setfiles_t sysfs_t:filesystem getattr;

audit2allow -R

#============= setfiles_t ==============
allow setfiles_t sysfs_t:filesystem getattr;

Comment 1 Miroslav Grepl 2011-08-23 13:36:43 UTC
You probably need to complete an update to Rawhide.