Bug 682531 - SELinux is preventing /sbin/setfiles from 'write' accesses on the file /home/thomas/bash/ff-check.stdout.
Summary: SELinux is preventing /sbin/setfiles from 'write' accesses on the file /home/...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 15
Hardware: i386
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:2f24a24e23f...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-06 12:48 UTC by Thomas Meyer
Modified: 2011-03-07 22:14 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-07 22:14:07 UTC
Type: ---


Attachments (Terms of Use)

Description Thomas Meyer 2011-03-06 12:48:33 UTC
SELinux is preventing /sbin/setfiles from 'write' accesses on the file /home/thomas/bash/ff-check.stdout.

*****  Plugin catchall (50.5 confidence) suggests  ***************************

If you believe that setfiles should be allowed write access on the ff-check.stdout 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 setfiles /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

*****  Plugin leaks (50.5 confidence) suggests  ******************************

If you want to ignore setfiles trying to write access the ff-check.stdout file, because you believe it should not need this access.
Then you should report this as a bug.  
You can generate a local policy module to dontaudit this access.
Do
# grep /sbin/setfiles /var/log/audit/audit.log | audit2allow -D -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:setfiles_t:s0-s0:c0.c102
                              3
Target Context                unconfined_u:object_r:user_home_t:s0
Target Objects                /home/thomas/bash/ff-check.stdout [ file ]
Source                        setfiles
Source Path                   /sbin/setfiles
Port                          <Unbekannt>
Host                          (removed)
Source RPM Packages           policycoreutils-2.0.85-12.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.15-2.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.38-rc7-00142-g212e349 #267 Sat Mar 5 21:22:31
                              CET 2011 i686 i686
Alert Count                   1
First Seen                    So 06 Mär 2011 12:54:37 CET
Last Seen                     So 06 Mär 2011 12:54:37 CET
Local ID                      e274332d-91e4-4dca-bccb-c282346858ed

Raw Audit Messages
type=AVC msg=audit(1299412477.32:531): avc:  denied  { write } for  pid=24114 comm="setfiles" path="/home/thomas/bash/ff-check.stdout" dev=dm-0 ino=11665423 scontext=unconfined_u:unconfined_r:setfiles_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file


type=SYSCALL msg=audit(1299412477.32:531): arch=i386 syscall=execve success=yes exit=0 a0=b7b36780 a1=b742e558 a2=0 a3=0 items=0 ppid=20492 pid=24114 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=tty4 ses=8 comm=setfiles exe=/sbin/setfiles subj=unconfined_u:unconfined_r:setfiles_t:s0-s0:c0.c1023 key=(null)

Hash: setfiles,setfiles_t,user_home_t,file,write

audit2allow

#============= setfiles_t ==============
allow setfiles_t user_home_t:file write;

audit2allow -R

#============= setfiles_t ==============
allow setfiles_t user_home_t:file write;

Comment 1 Thomas Meyer 2011-03-06 12:53:59 UTC
I did this:
"sudo fixfiles check > ~/bash/ff-check.stdout 2> ~/bash/ff-check.stderr &"

so I basically wanted to start this program as a bash background job.

Comment 2 Daniel Walsh 2011-03-07 22:14:07 UTC
I really do not want to fix this.  The easiest thing you could do to allow it would be to put in a cat in the stream

sudo fixfiles check | cat > ~/bash/ff-check.stdout 2> ~/bash/ff-check.stderr &


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