Bug 980633

Summary: Tmpwatch not allowed to open cups' tmp directory
Product: [Fedora] Fedora Reporter: Göran Uddeborg <goeran>
Component: selinux-policy-targetedAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Ben Levenson <benl>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: dwalsh
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.12.1-59.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-07 01:34:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Göran Uddeborg 2013-07-02 21:45:17 UTC
Description of problem:
I get error messages from anacron saying that the daily cups cron script isn't allowed to open /var/spool/cups/tmp.  And from setroubleshoot I get a corresponding message that tmpreaper_t isn't allowed to read print_spool_t.

Version-Release number of selected component (if applicable):
selinux-policy-targeted-3.12.1-57.fc19.noarch

How reproducible:
Every night

Steps to Reproduce:
1. Just wait for the nightly messages

Actual results:
Message from anacron:

    /etc/cron.daily/cups:

    error: opendir error on current directory /var/spool/cups/tmp: Permission denied
    error: cleanup failed in /var/spool/cups/tmp: Permission denied

Message from setroubleshoot, containing these details:

    type=AVC msg=audit(1372470004.532:881): avc:  denied  { read } for  pid=8880 comm="tmpwatch" name="tmp" dev="sda2" ino=3041586 scontext=system_u:system_r:tmpreaper_t:s0-s0:c0.c1023 tcontext=system_u:object_r:print_spool_t:s0 tclass=dir

    type=SYSCALL msg=audit(1372470004.532:881): arch=x86_64 syscall=openat success=no exit=EACCES a0=ffffffffffffff9c a1=404257 a2=90800 a3=0 items=0 ppid=8878 pid=8880 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=89 tty=(none) comm=tmpwatch exe=/usr/sbin/tmpwatch subj=system_u:system_r:tmpreaper_t:s0-s0:c0.c1023 key=(null)


Expected results:
No errors

Additional info:
I first got this when I installed an earlier version of selinux-policy during the alpha or beta phase.  But before I got around to reporting it, I saw that a newer version had the changelog entry

    Allow tmpwatch to read tmp in /var/spool/{cups,lpd}

for version 3.12.1-33.  But now after upgrading I still get these messages, which makes me wonder.  Could it be something "stuck" from the previous policy version?

Comment 1 Miroslav Grepl 2013-07-03 11:52:28 UTC
commit f08071e821a07d0ee5e35ea8bb93491ff64441ba
Author: Miroslav Grepl <mgrepl>
Date:   Wed Jul 3 13:52:10 2013 +0200

    Allow tmpwatch to list /var/spool/cups/tmp

Comment 2 Fedora Update System 2013-07-03 19:51:07 UTC
selinux-policy-3.12.1-59.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-59.fc19

Comment 3 Fedora Update System 2013-07-05 02:14:54 UTC
Package selinux-policy-3.12.1-59.fc19:
* should fix your issue,
* was pushed to the Fedora 19 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.12.1-59.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-12373/selinux-policy-3.12.1-59.fc19
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2013-07-07 01:34:06 UTC
selinux-policy-3.12.1-59.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.