Bug 674837

Summary: SELinux is preventing /usr/libexec/postfix/cleanup from 'getattr' accesses on the file /var/spool/postfix/pid/unix.cleanup.
Product: [Fedora] Fedora Reporter: robb <redzilla>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 14CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:ac45a6b36bb0dc405d8919d0e1abb793ac8f43183f22ada5c403ee78c0212dbe
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-02-03 16:26:16 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 robb 2011-02-03 13:57:46 UTC
SELinux is preventing /usr/libexec/postfix/cleanup from 'getattr' accesses on the file /var/spool/postfix/pid/unix.cleanup.

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

If you want to fix the label. 
/var/spool/postfix/pid/unix.cleanup default label should be postfix_var_run_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /var/spool/postfix/pid/unix.cleanup

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

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

Additional Information:
Source Context                system_u:system_r:postfix_cleanup_t:s0
Target Context                unconfined_u:object_r:var_run_t:s0
Target Objects                /var/spool/postfix/pid/unix.cleanup [ file ]
Source                        cleanup
Source Path                   /usr/libexec/postfix/cleanup
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           postfix-2.7.1-1.fc14
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.7-25.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.35.10-74.fc14.x86_64 #1 SMP Thu
                              Dec 23 16:04:50 UTC 2010 x86_64 x86_64
Alert Count                   2
First Seen                    Thu 03 Feb 2011 02:51:53 PM CET
Last Seen                     Thu 03 Feb 2011 02:52:54 PM CET
Local ID                      de65e432-fc10-4a31-b2d6-51421047c167

Raw Audit Messages
type=AVC msg=audit(1296741174.61:1995): avc:  denied  { getattr } for  pid=7790 comm="cleanup" path="/var/spool/postfix/pid/unix.cleanup" dev=sda2 ino=131346 scontext=system_u:system_r:postfix_cleanup_t:s0 tcontext=unconfined_u:object_r:var_run_t:s0 tclass=file


type=SYSCALL msg=audit(1296741174.61:1995): arch=x86_64 syscall=fstat success=no exit=EACCES a0=8 a1=7ffffe98c7f0 a2=7ffffe98c7f0 a3=fffffffffffffff0 items=0 ppid=1828 pid=7790 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=cleanup exe=/usr/libexec/postfix/cleanup subj=system_u:system_r:postfix_cleanup_t:s0 key=(null)

Hash: cleanup,postfix_cleanup_t,var_run_t,file,getattr

audit2allow

#============= postfix_cleanup_t ==============
#!!!! This avc is allowed in the current policy

allow postfix_cleanup_t var_run_t:file getattr;

audit2allow -R

#============= postfix_cleanup_t ==============
#!!!! This avc is allowed in the current policy

allow postfix_cleanup_t var_run_t:file getattr;

Comment 1 Daniel Walsh 2011-02-03 16:26:16 UTC
Did you do what the alert suggested?

restorecon -R -v /var/run/postfix

Will fix your problem.