Bug 1379949

Summary: SELinux is preventing cupsd from 'read' accesses on the file hosts.
Product: [Fedora] Fedora Reporter: kakoskin
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: dominick.grift, dwalsh, lvrabec, mgrepl, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:6335f8248f2907cd4194ba377ab81186e4cedf8412086364b40f382f36bc06ab;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-29 21:17:37 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 kakoskin 2016-09-28 08:22:54 UTC
Description of problem:
This denial happened right after or during update. I was not using or configring CUPS at the time. 
SELinux is preventing cupsd from 'read' accesses on the file hosts.

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

If you believe that cupsd should be allowed read access on the hosts file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
allow this access for now by executing:
# ausearch -c 'cupsd' --raw | audit2allow -M my-cupsd
# semodule -X 300 -i my-cupsd.pp

Additional Information:
Source Context                system_u:system_r:cupsd_t:s0-s0:c0.c1023
Target Context                system_u:object_r:fusefs_t:s0
Target Objects                hosts [ file ]
Source                        cupsd
Source Path                   cupsd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-191.17.fc24.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.7.4-200.fc24.x86_64 #1 SMP Thu
                              Sep 15 18:42:09 UTC 2016 x86_64 x86_64
Alert Count                   2
First Seen                    2016-09-27 23:17:25 EEST
Last Seen                     2016-09-27 23:20:36 EEST
Local ID                      0d6c986f-6933-4482-84eb-a6e7860cbf38

Raw Audit Messages
type=AVC msg=audit(1475007636.476:288): avc:  denied  { read } for  pid=2928 comm="cupsd" name="hosts" dev="dm-1" ino=1966632 scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:fusefs_t:s0 tclass=file permissive=0

Hash: cupsd,cupsd_t,fusefs_t,file,read

Version-Release number of selected component:

Additional info:
reporter:       libreport-2.7.2
hashmarkername: setroubleshoot
kernel:         4.7.4-200.fc24.x86_64
type:           libreport

Comment 1 kakoskin 2016-09-29 21:17:37 UTC
Apologies. This was caused by a mislabeled file.