Bug 694424

Summary: SELinux is preventing /bin/cat from 'getattr' accesses on the file /var/run/syslogd.pid.
Product: [Fedora] Fedora Reporter: Maxim Prohorenko <maxim.prohorenko>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 15CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:bc29be53734d7eda00ae982b6c77796434d23c2e0d6ebaf7e7906851708253d1
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-07 12:10:17 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 Maxim Prohorenko 2011-04-07 10:31:10 UTC
SELinux is preventing /bin/cat from 'getattr' accesses on the file /var/run/syslogd.pid.

*****  Plugin restorecon (99.5 confidence) suggests  *************************

If you want to fix the label. 
/var/run/syslogd.pid default label should be syslogd_var_run_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /var/run/syslogd.pid

*****  Plugin catchall (1.49 confidence) suggests  ***************************

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

Additional Information:
Source Context                system_u:system_r:logrotate_t:s0-s0:c0.c1023
Target Context                system_u:object_r:tmpfs_t:s0
Target Objects                /var/run/syslogd.pid [ file ]
Source                        cat
Source Path                   /bin/cat
Port                          <Неизвестно>
Host                          (removed)
Source RPM Packages           coreutils-8.10-2.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-6.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 2.6.38.2-9.fc15.x86_64
                              #1 SMP Wed Mar 30 16:55:57 UTC 2011 x86_64 x86_64
Alert Count                   1
First Seen                    Вск 03 Апр 2011 03:36:02
Last Seen                     Вск 03 Апр 2011 03:36:02
Local ID                      83ab8bb8-c26f-49a8-aeea-017a202152ed

Raw Audit Messages
type=AVC msg=audit(1301787362.243:254): avc:  denied  { getattr } for  pid=7529 comm="cat" path="/var/run/syslogd.pid" dev=tmpfs ino=14030 scontext=system_u:system_r:logrotate_t:s0-s0:c0.c1023 tcontext=system_u:object_r:tmpfs_t:s0 tclass=file


type=SYSCALL msg=audit(1301787362.243:254): arch=x86_64 syscall=fstat success=yes exit=0 a0=3 a1=7fff4c474860 a2=7fff4c474860 a3=3b11281820 items=0 ppid=7528 pid=7529 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=8 comm=cat exe=/bin/cat subj=system_u:system_r:logrotate_t:s0-s0:c0.c1023 key=(null)

Hash: cat,logrotate_t,tmpfs_t,file,getattr

audit2allow

#============= logrotate_t ==============
allow logrotate_t tmpfs_t:file getattr;

audit2allow -R

#============= logrotate_t ==============
allow logrotate_t tmpfs_t:file getattr;

Comment 1 Miroslav Grepl 2011-04-07 12:10:17 UTC

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