Bug 963953 - cups selinux errors
cups selinux errors
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted (Show other bugs)
18
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-16 16:49 EDT by Samuel Sieb
Modified: 2013-05-21 04:40 EDT (History)
1 user (show)

See Also:
Fixed In Version: selinux-policy-3.11.1-95.fc18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-05-21 04:40:20 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Samuel Sieb 2013-05-16 16:49:06 EDT
CUPS has been giving me selinux errors since the beginning of March.  The problem has to do with it manipulating its log files.  It's so bad that I have to turn off CUPS except when I need to print something.  I've tried using restorecon and deleting the log files, but that didn't fix it.  From my yum log and the date in the details below, it looks like it was the update from selinux-policy-targeted-3.11.1-82.fc18 to selinux-policy-targeted-3.11.1-83.fc18 where it started.

setroubleshoot: SELinux is preventing /usr/sbin/cupsd from rename access on the file error_log.
setroubleshoot: SELinux is preventing /usr/sbin/cupsd from unlink access on the file /var/log/cups/error_log.O

Details on the first one:
SELinux is preventing /usr/sbin/cupsd from rename access on the file /var/log/cups/error_log.

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

If you believe that cupsd should be allowed rename access on the error_log 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                system_u:object_r:cupsd_log_t:s0
Target Objects                /var/log/cups/error_log [ file ]
Source                        cupsd
Source Path                   /usr/sbin/cupsd
Port                          <Unknown>
Host                          worklap
Source RPM Packages           cups-1.5.4-20.fc18.i686
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-92.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     worklap
Platform                      Linux worklap 3.8.11-200.fc18.i686.PAE #1 SMP Wed
                              May 1 20:30:05 UTC 2013 i686 i686
Alert Count                   153193
First Seen                    2013-03-08 23:44:05 PST
Last Seen                     2013-05-13 23:26:44 PDT
Local ID                      76eceba3-6f0b-41b6-a7d6-a21a3f190076

Raw Audit Messages
type=AVC msg=audit(1368512804.60:41941): avc:  denied  { rename } for  pid=6461 comm="cupsd" name="error_log" dev="sda3" ino=1588161 scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:cupsd_log_t:s0 tclass=file


type=SYSCALL msg=audit(1368512804.60:41941): arch=i386 syscall=rename success=no exit=EACCES a0=bffa84dc a1=bffa80dc a2=b779f000 a3=bffa80dc items=0 ppid=1 pid=6461 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_log_t,file,rename
Comment 1 Miroslav Grepl 2013-05-17 03:45:33 EDT
commit bb2b4bcb3fbb04ef34cb6e66f21a8a104431a232
Author: Miroslav Grepl <mgrepl@redhat.com>
Date:   Fri May 17 09:45:23 2013 +0200

    Change cupsd_t to be allowed to manage own log files
Comment 2 Fedora Update System 2013-05-17 07:00:34 EDT
selinux-policy-3.11.1-95.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-95.fc18
Comment 3 Samuel Sieb 2013-05-17 16:40:39 EDT
Strange that nobody filed this before.  I kept holding off filing it because I figured something this obvious was either something I did wrong or would be fixed with an update soon.  Maybe everyone else thought the same. :-)

Anyway, after updating to this, I don't get the CUPS errors now.
Comment 4 Fedora Update System 2013-05-18 22:43:52 EDT
Package selinux-policy-3.11.1-95.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.11.1-95.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-8591/selinux-policy-3.11.1-95.fc18
then log in and leave karma (feedback).
Comment 5 Fedora Update System 2013-05-21 04:40:20 EDT
selinux-policy-3.11.1-95.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

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