Bug 1321465 - SELinux is preventing sendmail from write, open access on the file /.esmtp_queue/pqX23o0a/cmd.
Summary: SELinux is preventing sendmail from write, open access on the file /.esmtp_qu...
Keywords:
Status: CLOSED DUPLICATE of bug 1303305
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 23
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:c66933fa00b8051ed71e34abb34...
: 1321466 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-27 16:04 UTC by hx
Modified: 2016-08-11 08:03 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-11 08:03:08 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description hx 2016-03-27 16:04:00 UTC
Description of problem:
SELinux is preventing sendmail from write, open access on the file /.esmtp_queue/pqX23o0a/cmd.

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

If you want to fix the label. 
/.esmtp_queue/pqX23o0a/cmd default label should be default_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /.esmtp_queue/pqX23o0a/cmd

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

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

Additional Information:
Source Context                system_u:system_r:system_mail_t:s0
Target Context                system_u:object_r:root_t:s0
Target Objects                /.esmtp_queue/pqX23o0a/cmd [ file ]
Source                        sendmail
Source Path                   sendmail
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-158.11.fc23.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 4.4.6-300.fc23.x86_64 #1 SMP Wed
                              Mar 16 22:10:37 UTC 2016 x86_64 x86_64
Alert Count                   1
First Seen                    2016-03-27 18:56:45 EEST
Last Seen                     2016-03-27 18:56:45 EEST
Local ID                      5f782bed-d1ac-4079-abe4-0c729f2a4e3f

Raw Audit Messages
type=AVC msg=audit(1459094205.475:515): avc:  denied  { write open } for  pid=7940 comm="sendmail" path="/.esmtp_queue/pqX23o0a/cmd" dev="dm-1" ino=1966083 scontext=system_u:system_r:system_mail_t:s0 tcontext=system_u:object_r:root_t:s0 tclass=file permissive=1


Hash: sendmail,system_mail_t,root_t,file,write,open

Version-Release number of selected component:
selinux-policy-3.13.1-158.11.fc23.noarch

Additional info:
reporter:       libreport-2.6.4
hashmarkername: setroubleshoot
kernel:         4.4.6-300.fc23.x86_64
type:           libreport

Comment 1 Daniel Walsh 2016-03-28 18:14:52 UTC
*** Bug 1321466 has been marked as a duplicate of this bug. ***

Comment 2 Ondřej Lysoněk 2016-08-11 08:03:08 UTC
The main issue here is that the '.esmtp_queue directory' should not be under '/' but under some home directory. This happens when sendmail doesn't have the $HOME environment variable set, e.g. when running from a cron job. This problem is being resolved in [1]. Marking as duplicate.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1303305

*** This bug has been marked as a duplicate of bug 1303305 ***


Note You need to log in before you can comment on or make changes to this bug.