Bug 665891

Summary: SELinux is preventing /usr/libexec/postfix/smtpd from read, write access on the file inet.smtp.
Product: [Fedora] Fedora Reporter: Ahmed Abdou <mail>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:65557d7329b58e019e624e41ce9fc9cc4d1187c002b0edd6c747408966afad49
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-12-28 20:07:29 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 Ahmed Abdou 2010-12-27 18:54:45 UTC
SELinux is preventing /usr/libexec/postfix/smtpd from read, write access on the file inet.smtp.

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

If you believe that smtpd should be allowed read write access on the inet.smtp 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 /usr/libexec/postfix/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                unconfined_u:object_r:var_run_t:s0
Target Objects                inet.smtp [ file ]
Source                        smtpd
Source Path                   /usr/libexec/postfix/smtpd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           postfix-2.7.1-1.fc14
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.7-18.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.35.10-72.fc14.x86_64
                              #1 SMP Mon Dec 20 21:14:22 UTC 2010 x86_64 x86_64
Alert Count                   1
First Seen                    Mon 27 Dec 2010 08:53:06 PM EET
Last Seen                     Mon 27 Dec 2010 08:53:06 PM EET
Local ID                      217cc11a-d4d5-46de-99d7-4d16ca528dc4

Raw Audit Messages
type=AVC msg=audit(1293475986.880:1235): avc:  denied  { read write } for  pid=14279 comm="smtpd" name="inet.smtp" dev=dm-0 ino=1064376 scontext=system_u:system_r:postfix_smtpd_t:s0 tcontext=unconfined_u:object_r:var_run_t:s0 tclass=file

smtpd,postfix_smtpd_t,var_run_t,file,read,write
type=SYSCALL msg=audit(1293475986.880:1235): arch=x86_64 syscall=open success=no exit=EACCES a0=7f09eb01f410 a1=2 a2=0 a3=1e items=0 ppid=2036 pid=14279 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=smtpd exe=/usr/libexec/postfix/smtpd subj=system_u:system_r:postfix_smtpd_t:s0 key=(null)
smtpd,postfix_smtpd_t,var_run_t,file,read,write

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

I've no idea why this is happening, but this alert keeps appearing one time at aminute

Comment 1 Daniel Walsh 2010-12-28 12:58:02 UTC
Where is inet.smtp located?

Comment 2 Ahmed Abdou 2010-12-28 15:58:53 UTC
/var/spool/postfix/pid/inet.smtp

Comment 3 Daniel Walsh 2010-12-28 20:07:29 UTC
restorecon -R -v /var/spool 

Should fix.

Reopen if it happens again.