Bug 980633 - Tmpwatch not allowed to open cups' tmp directory
Tmpwatch not allowed to open cups' tmp directory
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted (Show other bugs)
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2013-07-02 17:45 EDT by Göran Uddeborg
Modified: 2013-07-06 21:34 EDT (History)
1 user (show)

See Also:
Fixed In Version: selinux-policy-3.12.1-59.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-07-06 21:34:06 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Göran Uddeborg 2013-07-02 17:45:17 EDT
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):

How reproducible:
Every night

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

Actual results:
Message from anacron:


    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 07:52:28 EDT
commit f08071e821a07d0ee5e35ea8bb93491ff64441ba
Author: Miroslav Grepl <mgrepl@redhat.com>
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 15:51:07 EDT
selinux-policy-3.12.1-59.fc19 has been submitted as an update for Fedora 19.
Comment 3 Fedora Update System 2013-07-04 22:14:54 EDT
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:
then log in and leave karma (feedback).
Comment 4 Fedora Update System 2013-07-06 21:34:06 EDT
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.

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