Bug 1410877

Summary: SELinux is preventing cupsd from 'rename' accesses on the file printers.conf.
Product: [Fedora] Fedora Reporter: Richard Troxel <rick+bugz>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: dominick.grift, dwalsh, lvrabec, mgrepl, plautrba, pmoore, ssekidde
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:34db8d4c5d34e6054b84b934f2818196666ed8fe7ccec32d04ec4f1d208d07aa;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-06 20:59:42 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 Richard Troxel 2017-01-06 17:01:32 UTC
Description of problem:
SELinux is preventing cupsd from 'rename' accesses on the file printers.conf.

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

If you believe that cupsd should be allowed rename access on the printers.conf 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:
# 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                unconfined_u:object_r:user_tmp_t:s0
Target Objects                printers.conf [ file ]
Source                        cupsd
Source Path                   cupsd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-225.3.fc25.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 4.8.15-300.fc25.x86_64 #1 SMP Thu
                              Dec 15 23:10:23 UTC 2016 x86_64 x86_64
Alert Count                   1
First Seen                    2016-12-27 11:09:01 EST
Last Seen                     2016-12-27 11:09:01 EST
Local ID                      830b98cb-0096-48fe-8e4c-7a1749c8de14

Raw Audit Messages
type=AVC msg=audit(1482854941.855:238): avc:  denied  { rename } for  pid=3639 comm="cupsd" name="printers.conf" dev="dm-0" ino=661899 scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_tmp_t:s0 tclass=file permissive=1


Hash: cupsd,cupsd_t,user_tmp_t,file,rename

Version-Release number of selected component:
selinux-policy-3.13.1-225.3.fc25.noarch

Additional info:
reporter:       libreport-2.8.0
hashmarkername: setroubleshoot
kernel:         4.8.15-300.fc25.x86_64
type:           libreport

Comment 1 Daniel Walsh 2017-01-06 20:59:42 UTC
Looks like some process created a printers.conf in /tmp and mv'd it to /etc.

Run restorcon printers.conf and it should be fixed.

Comment 2 Daniel Walsh 2017-01-06 21:00:13 UTC
*** Bug 1410878 has been marked as a duplicate of this bug. ***