Bug 722921

Summary: SELinux is preventing /usr/sbin/postdrop from 'getattr' accesses on the unix_stream_socket unix_stream_socket.
Product: [Fedora] Fedora Reporter: Matěj Cepl <mcepl>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: dominick.grift, dwalsh, mcepl, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:91116d0c5d558ce02963f11f47eb03b7c872f187e80a36b2c51a595e55a95ef6
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-19 15:09:00 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 Matěj Cepl 2011-07-18 13:32:37 UTC
SELinux is preventing /usr/sbin/postdrop from 'getattr' accesses on the unix_stream_socket unix_stream_socket.
As an illustration of what I believe is behind https://bugzilla.redhat.com/show_bug.cgi?id=718268#c15
*****  Plugin catchall (100. confidence) suggests  ***************************

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

Additional Information:
Source Context                staff_u:staff_r:postfix_postdrop_t:s0-s0:c0.c1023
Target Context                staff_u:staff_r:staff_t:s0-s0:c0.c1023
Target Objects                unix_stream_socket [ unix_stream_socket ]
Source                        postdrop
Source Path                   /usr/sbin/postdrop
Port                          <Neznámé>
Host                          (removed)
Source RPM Packages           postfix-2.8.4-1.fc16
Target RPM Packages           
Policy RPM                    selinux-policy-3.10.0-5.fc16
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.0-0.rc7.git3.1.fc16.x86_64 #1 SMP
                              Fri Jul 15 22:56:12 UTC 2011 x86_64 x86_64
Alert Count                   1
First Seen                    Po 18. červenec 2011, 15:25:45 CEST
Last Seen                     Po 18. červenec 2011, 15:25:45 CEST
Local ID                      68b052ab-8dfe-462a-b9da-df861a308fd7

Raw Audit Messages
type=AVC msg=audit(1310995545.653:1197): avc:  denied  { getattr } for  pid=12219 comm="postdrop" path="socket:[478175]" dev=sockfs ino=478175 scontext=staff_u:staff_r:postfix_postdrop_t:s0-s0:c0.c1023 tcontext=staff_u:staff_r:staff_t:s0-s0:c0.c1023 tclass=unix_stream_socket


type=SYSCALL msg=audit(1310995545.653:1197): arch=x86_64 syscall=fstat success=yes exit=0 a0=0 a1=7fff9f587330 a2=7fff9f587330 a3=7fff9f587080 items=0 ppid=12218 pid=12219 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=90 sgid=90 fsgid=90 tty=pts1 ses=1 comm=postdrop exe=/usr/sbin/postdrop subj=staff_u:staff_r:postfix_postdrop_t:s0-s0:c0.c1023 key=(null)

Hash: postdrop,postfix_postdrop_t,staff_t,unix_stream_socket,getattr

audit2allow

#============= postfix_postdrop_t ==============
allow postfix_postdrop_t staff_t:unix_stream_socket getattr;

audit2allow -R

#============= postfix_postdrop_t ==============
allow postfix_postdrop_t staff_t:unix_stream_socket getattr;

Comment 1 Daniel Walsh 2011-07-19 15:09:00 UTC
Fixed in selinux-policy-3.10.0-6.fc16