Bug 723464

Summary: SELinux is preventing systemd from 'search' accesses on the directory /var/spool/postfix.
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:d65a237f9ace5f361e2573180afe2a61a5acb52e33c977d45242897382018aa1
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-20 21:53:45 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-20 09:52:17 UTC
SELinux is preventing systemd from 'search' accesses on the directory /var/spool/postfix.

*****  Plugin catchall (100. confidence) suggests  ***************************

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

Additional Information:
Source Context                system_u:system_r:init_t:s0
Target Context                system_u:object_r:postfix_spool_t:s0
Target Objects                /var/spool/postfix [ dir ]
Source                        systemd
Source Path                   systemd
Port                          <Neznámé>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           postfix-2.8.4-1.fc16
Policy RPM                    selinux-policy-3.10.0-5.fc16
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
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                    Út 19. červenec 2011, 01:41:29 CEST
Last Seen                     Út 19. červenec 2011, 01:41:29 CEST
Local ID                      2ee95ec9-1fab-4239-a9ed-ff8f4b5a59a0

Raw Audit Messages
type=AVC msg=audit(1311032489.58:19): avc:  denied  { search } for  pid=1 comm="systemd" name="postfix" dev=dm-1 ino=265522 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:postfix_spool_t:s0 tclass=dir


Hash: systemd,init_t,postfix_spool_t,dir,search

audit2allow

#============= init_t ==============
allow init_t postfix_spool_t:dir search;

audit2allow -R

#============= init_t ==============
allow init_t postfix_spool_t:dir search;

Comment 1 Miroslav Grepl 2011-07-20 13:12:21 UTC
Does it need to read this directory?

# semanage permissive -a init_t

Comment 2 Daniel Walsh 2011-07-20 21:53:45 UTC
systemd is creating fifo_file or socket_file in /var/spool and /run directories for any app that gets converted to using systemd config.  So we need to allow this.

I believe this is fixed in selinux-policy-3.10.0-6.fc16