Bug 671893

Summary: SELinux is preventing /bin/chown from 'setattr' accesses on the file mounts.
Product: [Fedora] Fedora Reporter: Eric Blake <eblake>
Component: util-linuxAssignee: Karel Zak <kzak>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: dwalsh, jonathan, kzak, mgrepl, rpandit
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:29b001bf5c95aab2d4bfa8f1120c577328e7d3a95e1e1845cad2766b3cc1cd9e
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-25 16:41:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Eric Blake 2011-01-22 16:29:29 UTC
SELinux is preventing /bin/chown from 'setattr' accesses on the file mounts.

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

If you believe that chown should be allowed setattr access on the mounts 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 chown /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:system_r:rpm_script_t:s0-s0:c0.c1023
Target Context                unconfined_u:system_r:rpm_script_t:s0-s0:c0.c1023
Target Objects                mounts [ file ]
Source                        chown
Source Path                   /bin/chown
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           coreutils-8.9-2.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.12-7.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.37-2.fc15.i686 #1 SMP Fri Jan 7
                              15:46:20 UTC 2011 i686 i686
Alert Count                   1
First Seen                    Sat 22 Jan 2011 09:27:34 AM MST
Last Seen                     Sat 22 Jan 2011 09:27:34 AM MST
Local ID                      834aa833-33a9-4441-8d0a-ad50a3c9eff7

Raw Audit Messages
type=AVC msg=audit(1295713654.72:68): avc:  denied  { setattr } for  pid=2940 comm="chown" name="mounts" dev=proc ino=38514 scontext=unconfined_u:system_r:rpm_script_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:rpm_script_t:s0-s0:c0.c1023 tclass=file


type=SYSCALL msg=audit(1295713654.72:68): arch=i386 syscall=fchownat success=no exit=EACCES a0=ffffff9c a1=90a7a18 a2=0 a3=0 items=0 ppid=2930 pid=2940 auid=14986 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=1 comm=chown exe=/bin/chown subj=unconfined_u:system_r:rpm_script_t:s0-s0:c0.c1023 key=(null)

Hash: chown,rpm_script_t,rpm_script_t,file,setattr

audit2allow

#============= rpm_script_t ==============
allow rpm_script_t self:file setattr;

audit2allow -R

#============= rpm_script_t ==============
allow rpm_script_t self:file setattr;

Comment 1 Karel Zak 2011-02-01 19:31:50 UTC
*** Bug 673917 has been marked as a duplicate of this bug. ***