Bug 1081659

Summary: SELinux is preventing /usr/sbin/cupsd from 'unlink' accesses on the file .
Product: [Fedora] Fedora Reporter: Peter H. Jones <jones.peter.busi>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: dominick.grift, dwalsh, lvrabec, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:a042f29c471049e79df07f06e1b37cc81f8de414a8fbdfc8c24ab11506214969
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-28 08:33:10 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 Peter H. Jones 2014-03-27 18:17:50 UTC
Description of problem:
Bug, trying to restart cupsd.
SELinux is preventing /usr/sbin/cupsd from 'unlink' accesses on the file .

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

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

Additional Information:
Source Context                system_u:system_r:cupsd_t:s0-s0:c0.c1023
Target Context                unconfined_u:object_r:cupsd_etc_t:s0
Target Objects                 [ file ]
Source                        cupsd
Source Path                   /usr/sbin/cupsd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           cups-1.7.1-8.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-135.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.13.6-200.fc20.x86_64 #1 SMP Fri
                              Mar 7 17:02:28 UTC 2014 x86_64 x86_64
Alert Count                   1
First Seen                    2014-03-27 14:13:33 EDT
Last Seen                     2014-03-27 14:13:33 EDT
Local ID                      56537c4a-75d8-4fad-b524-bb6dee8d1879

Raw Audit Messages
type=AVC msg=audit(1395944013.363:502): avc:  denied  { unlink } for  pid=1670 comm="cupsd" name="printers.conf.O" dev="sda9" ino=783863 scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:cupsd_etc_t:s0 tclass=file


type=SYSCALL msg=audit(1395944013.363:502): arch=x86_64 syscall=unlink success=no exit=EACCES a0=7fff354519f0 a1=7ffeb31788bf a2=7fff35451a09 a3=17 items=0 ppid=1 pid=1670 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=cupsd exe=/usr/sbin/cupsd subj=system_u:system_r:cupsd_t:s0-s0:c0.c1023 key=(null)

Hash: cupsd,cupsd_t,cupsd_etc_t,file,unlink

Additional info:
reporter:       libreport-2.2.0
hashmarkername: setroubleshoot
kernel:         3.13.6-200.fc20.x86_64
type:           libreport

Potential duplicate: bug 883742

Comment 1 Miroslav Grepl 2014-03-28 08:33:10 UTC
Please execute

# restorecon -R -v /etc/cups/printers*