Bug 918086 - SELinux is preventing /usr/sbin/cupsd from 'getattr' accesses on the fifo_file /var/spool/cups/tmp/hpfax-pipe-1.
Summary: SELinux is preventing /usr/sbin/cupsd from 'getattr' accesses on the fifo_fil...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 18
Hardware: i686
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:e2f88bc9787ed9ce6e4967c417e...
Depends On: 917756
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-05 13:03 UTC by Miroslav Grepl
Modified: 2013-03-14 03:03 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 917756
Environment:
Last Closed: 2013-03-14 03:03:39 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Miroslav Grepl 2013-03-05 13:03:35 UTC
+++ This bug was initially created as a clone of Bug #917756 +++

Description of problem:
SELinux is preventing /usr/sbin/cupsd from 'getattr' accesses on the fifo_file /var/spool/cups/tmp/hpfax-pipe-1.

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

If sie denken, dass es cupsd standardmässig erlaubt sein sollte, getattr Zugriff auf hpfax-pipe-1 fifo_file zu erhalten.
Then sie sollten dies als Fehler melden.
Um diesen Zugriff zu erlauben, können Sie ein lokales Richtlinien-Modul erstellen.
Do
zugriff jetzt erlauben, indem Sie die nachfolgenden Befehle ausführen:
# 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:print_spool_t:s0
Target Objects                /var/spool/cups/tmp/hpfax-pipe-1 [ fifo_file ]
Source                        cupsd
Source Path                   /usr/sbin/cupsd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           cups-1.5.4-20.fc18.i686
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-81.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.7.9-205.fc18.i686.PAE #1 SMP Sun
                              Feb 24 20:58:16 UTC 2013 i686 i686
Alert Count                   2
First Seen                    2013-03-01 10:52:31 CET
Last Seen                     2013-03-04 16:49:25 CET
Local ID                      75adbcce-0177-4269-b1a4-9c86dbd5dfb7

Raw Audit Messages
type=AVC msg=audit(1362412165.20:334): avc:  denied  { getattr } for  pid=1664 comm="cupsd" path="/var/spool/cups/tmp/hpfax-pipe-1" dev="sda1" ino=1585238 scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:print_spool_t:s0 tclass=fifo_file


type=SYSCALL msg=audit(1362412165.20:334): arch=i386 syscall=stat64 success=no exit=EACCES a0=bfd12128 a1=b8e571a8 a2=b724b000 a3=b8e56ca0 items=0 ppid=1 pid=1664 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,print_spool_t,fifo_file,getattr

audit2allow

#============= cupsd_t ==============
allow cupsd_t print_spool_t:fifo_file getattr;

audit2allow -R

#============= cupsd_t ==============
allow cupsd_t print_spool_t:fifo_file getattr;


Additional info:
hashmarkername: setroubleshoot
kernel:         3.7.9-205.fc18.i686.PAE
type:           libreport

--- Additional comment from Daniel Walsh on 2013-03-04 13:22:16 EST ---

Is there a reason this is here rather then under /run?

--- Additional comment from Tim Waugh on 2013-03-05 04:33:57 EST ---

It does look like that's in the wrong place.  Upstream HPLIP puts it in /tmp, but it just needs to be anywhere that can be accessed by a user logged in at the console. (A D-Bus message is sent to an activatable user process.)

If I change the location to /run/hplip/, we'll need to make sure that directory gets the correct file context -- which would be cupsd_var_run_t I guess?

--- Additional comment from Miroslav Grepl on 2013-03-05 04:56:27 EST ---

Yes.

--- Additional comment from Tim Waugh on 2013-03-05 06:25:21 EST ---

OK. Let me know when a new selinux-policy package has been built with an updated path context for /run/hplip.

Here's the specfile change for hplip.spec:

+%dir %attr(0775,root,lp) %{_localstatedir}/run/hplip

Comment 1 Miroslav Grepl 2013-03-05 13:05:17 UTC
commit 8e5da810bed9dd54162d268e5a944670d5482aaa
Author: Miroslav Grepl <mgrepl>
Date:   Tue Mar 5 10:55:00 2013 +0100

    Add labeling for /var/run/hplip

Comment 2 Fedora Update System 2013-03-08 16:12:26 UTC
selinux-policy-3.11.1-84.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-84.fc18

Comment 3 Fedora Update System 2013-03-08 23:59:54 UTC
Package selinux-policy-3.11.1-84.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-84.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-3605/selinux-policy-3.11.1-84.fc18
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2013-03-12 23:39:07 UTC
Package selinux-policy-3.11.1-85.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-85.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-3605/selinux-policy-3.11.1-85.fc18
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2013-03-14 03:03:42 UTC
selinux-policy-3.11.1-85.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.