Bug 1607048

Summary: SELinux is preventing mktemp from 'write' accesses on the directory .esmtp_queue.
Product: [Fedora] Fedora Reporter: Kalle Näslund <bigletter>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: dwalsh, lvrabec, mgrepl, plautrba, pmoore
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:5832a50aa26db5c4ff99800a8c8d73f708f62ec83f9e587734d6e0aede2d746b;VARIANT_ID=workstation;
Fixed In Version: selinux-policy-3.14.1-36.fc28 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-29 03:24:52 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 Kalle Näslund 2018-07-21 10:56:24 UTC
Description of problem:
After upgrading to fedora 28 the SELinux allert app started to show this warning.
SELinux is preventing mktemp from 'write' accesses on the directory .esmtp_queue.

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

If you believe that mktemp should be allowed write access on the .esmtp_queue 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:
# ausearch -c 'mktemp' --raw | audit2allow -M my-mktemp
# semodule -X 300 -i my-mktemp.pp

Additional Information:
Source Context                system_u:system_r:fsdaemon_t:s0
Target Context                system_u:object_r:mail_home_rw_t:s0
Target Objects                .esmtp_queue [ dir ]
Source                        mktemp
Source Path                   mktemp
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.1-32.fc28.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 4.17.6-200.fc28.x86_64 #1 SMP Wed
                              Jul 11 20:29:01 UTC 2018 x86_64 x86_64
Alert Count                   4
First Seen                    2018-07-21 12:53:51 CEST
Last Seen                     2018-07-21 12:54:01 CEST
Local ID                      a0f4a913-f70a-46ff-bb9b-30b0b3b496c5

Raw Audit Messages
type=AVC msg=audit(1532170441.667:281): avc:  denied  { write } for  pid=2573 comm="dotlockfile" name=".esmtp_queue" dev="dm-0" ino=2623139 scontext=system_u:system_r:fsdaemon_t:s0 tcontext=system_u:object_r:mail_home_rw_t:s0 tclass=dir permissive=1


Hash: mktemp,fsdaemon_t,mail_home_rw_t,dir,write

Version-Release number of selected component:
selinux-policy-3.14.1-32.fc28.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.5
hashmarkername: setroubleshoot
kernel:         4.17.6-200.fc28.x86_64
type:           libreport

Potential duplicate: bug 1427357

Comment 1 Fedora Update System 2018-07-25 22:31:17 UTC
selinux-policy-3.14.1-36.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-1050fb248b

Comment 2 Fedora Update System 2018-07-26 16:33:05 UTC
selinux-policy-3.14.1-36.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-1050fb248b

Comment 3 Fedora Update System 2018-07-29 03:24:52 UTC
selinux-policy-3.14.1-36.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.