Bug 964679

Summary: SELinux is preventing smtpd from read, write access on the file /var/spool/postfix/pid/inet.submission.
Product: [Fedora] Fedora Reporter: Juan Orti <jorti>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: bugzilla, dominick.grift, dwalsh, mgrepl, rgnoble, samuel-rhbugs, wolfgang.rupprecht
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:41d0a577626b2c31ad356315f11bf08264dd1aeb3465658ec8ded350fe74de0e
Fixed In Version: selinux-policy-3.11.1-96.fc18 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 981878 (view as bug list) Environment:
Last Closed: 2013-05-23 12:27:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Juan Orti 2013-05-19 13:32:15 UTC
Description of problem:
SELinux is preventing smtpd from read, write access on the file /var/spool/postfix/pid/inet.submission.

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

If cree que de manera predeterminada, smtpd debería permitir acceso read write sobre  inet.submission file.     
Then debería reportar esto como un error.
Puede generar un módulo de política local para permitir este acceso.
Do
permita el acceso momentáneamente executando:
# grep smtpd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:postfix_smtpd_t:s0
Target Context                system_u:object_r:postfix_var_run_t:s0
Target Objects                /var/spool/postfix/pid/inet.submission [ file ]
Source                        smtpd
Source Path                   smtpd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           postfix-2.9.6-4.fc18.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-95.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.2-200.fc18.x86_64 #1 SMP Mon
                              May 13 13:59:47 UTC 2013 x86_64 x86_64
Alert Count                   2
First Seen                    2013-05-19 15:30:10 CEST
Last Seen                     2013-05-19 15:30:56 CEST
Local ID                      06b47d63-3277-4480-8af9-3729288c9064

Raw Audit Messages
type=AVC msg=audit(1368970256.224:776): avc:  denied  { read write } for  pid=9712 comm="smtpd" name="inet.submission" dev="dm-2" ino=6162153 scontext=system_u:system_r:postfix_smtpd_t:s0 tcontext=system_u:object_r:postfix_var_run_t:s0 tclass=file


type=SYSCALL msg=audit(1368970256.224:776): arch=x86_64 syscall=open success=no exit=EACCES a0=7f437e65af50 a1=2 a2=0 a3=11 items=0 ppid=9705 pid=9712 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=smtpd exe=/usr/libexec/postfix/smtpd subj=system_u:system_r:postfix_smtpd_t:s0 key=(null)

Hash: smtpd,postfix_smtpd_t,postfix_var_run_t,file,read,write

audit2allow

#============= postfix_smtpd_t ==============
allow postfix_smtpd_t postfix_var_run_t:file { read write };

audit2allow -R
require {
	type postfix_smtpd_t;
	type postfix_var_run_t;
	class file { read write };
}

#============= postfix_smtpd_t ==============
allow postfix_smtpd_t postfix_var_run_t:file { read write };


Additional info:
hashmarkername: setroubleshoot
kernel:         3.9.2-200.fc18.x86_64
type:           libreport

Potential duplicate: bug 960075

Comment 1 Miroslav Grepl 2013-05-20 09:18:43 UTC
*** Bug 964763 has been marked as a duplicate of this bug. ***

Comment 2 Miroslav Grepl 2013-05-20 09:21:59 UTC
Back ported. You can allow it for now using

# grep smtpd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Comment 3 Fedora Update System 2013-05-20 13:41:10 UTC
selinux-policy-3.11.1-96.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-96.fc18

Comment 4 Fedora Update System 2013-05-21 08:43:46 UTC
Package selinux-policy-3.11.1-96.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.11.1-96.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-8730/selinux-policy-3.11.1-96.fc18
then log in and leave karma (feedback).

Comment 5 Wolfgang Rupprecht 2013-05-22 03:48:14 UTC
Description of problem:
This happened with normal postfix startup by systemd.  Looks like permissions might have gotten tightened a bit too much.

Additional info:
hashmarkername: setroubleshoot
kernel:         3.8.11-200.fc18.x86_64
type:           libreport

Comment 6 Miroslav Grepl 2013-05-22 06:30:01 UTC
*** Bug 962065 has been marked as a duplicate of this bug. ***

Comment 7 Miroslav Grepl 2013-05-22 06:30:03 UTC
*** Bug 965795 has been marked as a duplicate of this bug. ***

Comment 8 Roger Noble 2013-05-22 08:50:46 UTC
Description of problem:
Any postfix usage will reproduce.

Additional info:
hashmarkername: setroubleshoot
kernel:         3.9.2-200.fc18.x86_64
type:           libreport

Comment 9 Roger Noble 2013-05-22 09:02:41 UTC
selinux-policy-3.11.1-96.fc18 fixes it for me thanks.

Comment 10 Wolfgang Rupprecht 2013-05-22 13:22:41 UTC
selinux-policy-3.11.1-96.fc18 fixes it for me too.  thanks!

Comment 11 Fedora Update System 2013-05-23 12:27:26 UTC
selinux-policy-3.11.1-96.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.