Bug 710776 - SELinux is preventing /sbin/setfiles from 'write' accesses on the file /var/log/xdm.log.
Summary: SELinux is preventing /sbin/setfiles from 'write' accesses on the file /var/l...
Keywords:
Status: CLOSED DUPLICATE of bug 596360
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 15
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:36e97f9c2e3...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-04 17:32 UTC by Daniel Demus
Modified: 2011-06-05 08:19 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-05 08:19:36 UTC
Type: ---


Attachments (Terms of Use)

Description Daniel Demus 2011-06-04 17:32:16 UTC
SELinux is preventing /sbin/setfiles from 'write' accesses on the file /var/log/xdm.log.

*****  Plugin restorecon (98.5 confidence) suggests  *************************

If you want to fix the label. 
/var/log/xdm.log default label should be var_log_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /var/log/xdm.log

*****  Plugin leaks (1.48 confidence) suggests  ******************************

If you want to ignore setfiles trying to write access the xdm.log 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

*****  Plugin catchall (1.48 confidence) suggests  ***************************

If you believe that setfiles should be allowed write access on the xdm.log 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 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
                              3
Target Context                system_u:object_r:xdm_log_t:s0
Target Objects                /var/log/xdm.log [ 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-26.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 2.6.38.6-27.fc15.x86_64 #1 SMP
                              Sun May 15 17:23:28 UTC 2011 x86_64 x86_64
Alert Count                   6
First Seen                    Fri 03 Jun 2011 17:37:43 CEST
Last Seen                     Sat 04 Jun 2011 19:29:52 CEST
Local ID                      b3eff8c2-02d3-4aae-be24-a7b4a399f4ef

Raw Audit Messages
type=AVC msg=audit(1307208592.580:103): avc:  denied  { write } for  pid=3008 comm="restorecon" path="/var/log/xdm.log" dev=sda2 ino=7649 scontext=unconfined_u:unconfined_r:setfiles_t:s0-s0:c0.c1023 tcontext=system_u:object_r:xdm_log_t:s0 tclass=file


type=SYSCALL msg=audit(1307208592.580:103): arch=x86_64 syscall=execve success=yes exit=0 a0=1c9ff00 a1=1c9fe60 a2=1c9bd60 a3=8 items=0 ppid=3004 pid=3008 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=3 comm=restorecon exe=/sbin/setfiles subj=unconfined_u:unconfined_r:setfiles_t:s0-s0:c0.c1023 key=(null)

Hash: restorecon,setfiles_t,xdm_log_t,file,write

audit2allow

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

audit2allow -R

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

Comment 1 Miroslav Grepl 2011-06-05 08:19:36 UTC

*** This bug has been marked as a duplicate of bug 596360 ***


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