Bug 726655 - SELinux is preventing /usr/bin/tpprint from 'write' accesses on the directory lucas.
Summary: SELinux is preventing /usr/bin/tpprint from 'write' accesses on the directory...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 15
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:d95477ef3ee...
: 726657 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-29 11:22 UTC by oeffoeff1967
Modified: 2012-08-07 19:58 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-07 19:58:44 UTC
Type: ---


Attachments (Terms of Use)

Description oeffoeff1967 2011-07-29 11:22:45 UTC
SELinux is preventing /usr/bin/tpprint from 'write' accesses on the directory lucas.

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

If you believe that tpprint should be allowed write access on the lucas directory 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 tpprint /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:var_spool_t:s0
Target Objects                lucas [ dir ]
Source                        tpprint
Source Path                   /usr/bin/tpprint
Port                          <Unbekannt>
Host                          (removed)
Source RPM Packages           turboprint-2.21-1
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-34.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.38.8-35.fc15.x86_64 #1 SMP Wed Jul 6 13:58:54
                              UTC 2011 x86_64 x86_64
Alert Count                   3
First Seen                    Do 28 Jul 2011 00:15:03 CEST
Last Seen                     Do 28 Jul 2011 00:15:31 CEST
Local ID                      9a91e3d5-94e6-4776-bd67-14da2adaccbb

Raw Audit Messages
type=AVC msg=audit(1311804931.807:341): avc:  denied  { write } for  pid=15400 comm="tpprint" name="lucas" dev=dm-4 ino=1312351 scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:var_spool_t:s0 tclass=dir


type=SYSCALL msg=audit(1311804931.807:341): arch=x86_64 syscall=open success=no exit=EACCES a0=7fff927b6840 a1=241 a2=1b6 a3=9 items=0 ppid=15379 pid=15400 auid=4294967295 uid=4 gid=7 euid=4 suid=4 fsuid=4 egid=7 sgid=7 fsgid=7 tty=(none) ses=4294967295 comm=tpprint exe=/usr/bin/tpprint subj=system_u:system_r:cupsd_t:s0-s0:c0.c1023 key=(null)

Hash: tpprint,cupsd_t,var_spool_t,dir,write

audit2allow

#============= cupsd_t ==============
#!!!! The source type 'cupsd_t' can write to a 'dir' of the following types:
# print_spool_t, cupsd_interface_t, var_lock_t, tmp_t, var_t, cupsd_rw_etc_t, cupsd_tmp_t, cupsd_etc_t, cupsd_log_t, var_run_t, var_log_t, cupsd_var_run_t, pcscd_var_run_t, root_t

allow cupsd_t var_spool_t:dir write;

audit2allow -R

#============= cupsd_t ==============
#!!!! The source type 'cupsd_t' can write to a 'dir' of the following types:
# print_spool_t, cupsd_interface_t, var_lock_t, tmp_t, var_t, cupsd_rw_etc_t, cupsd_tmp_t, cupsd_etc_t, cupsd_log_t, var_run_t, var_log_t, cupsd_var_run_t, pcscd_var_run_t, root_t

allow cupsd_t var_spool_t:dir write;

Comment 1 Miroslav Grepl 2011-07-29 12:00:44 UTC
Where exactly is "lucas" located in /var/spool?

Comment 2 Miroslav Grepl 2011-07-29 12:00:57 UTC
*** Bug 726657 has been marked as a duplicate of this bug. ***

Comment 3 Colin Barker 2011-11-09 23:32:27 UTC
I think this is related to Bug 476975 previously ocurring and fixed in Fedora 9.

In Fedora 15 on x86_64 architecture tpprint cannot write to:
drwxrwxr-x system_u:object_r:var_spool_t:s0     lp      lp /var/spool/turboprint/ink
drwxrwx--- unconfined_u:object_r:var_spool_t:s0 <uname> lp /var/spool/turboprint/<uname>
drwxrwx--- unconfined_u:object_r:var_spool_t:s0 <uname> lp /var/spool/turboprint/<uname>/zmf
prw-rw---- unconfined_u:object_r:var_spool_t:s0 <uname> lp /var/spool/turboprint/<uname>/fd

when using licensed turboprint 2.22-2

Comment 4 Miroslav Grepl 2011-11-10 08:10:21 UTC
Good catch.

# chcon -R -t cupsd_var_run_t /var/spool/turboprint

will fix

What does

# rpm -qf /var/spool/turboprint

Comment 5 Colin Barker 2011-11-10 18:20:10 UTC
# rpm -qf /var/spool/turboprint
turboprint-2.22-2.x86_64

# rpm -qf /usr/bin/tpprint
turboprint-2.22-2.x86_64

# rpm -qi turboprint-2.22-2.x86_64
Name        : turboprint
Version     : 2.22
Release     : 2
Architecture: x86_64
Install Date: Tue 01 Nov 2011 11:02:17 PM GMT
Group       : Utilities/Printing
Size        : 53674990
License     : commercial
Signature   : (none)
Source RPM  : turboprint-2.22-2.src.rpm
Build Date  : Mon 24 Oct 2011 03:54:36 PM BST
Build Host  : suse111flo.local
Relocations : (not relocatable)
Packager    : ZEDOnet GmbH <mail zedonet de>
Vendor      : ZEDOnet
URL         : http://www.turboprint.de/
Summary     : High-quality printer driver system for Linux
Description : ...etc...

Many thanks. CB.

Comment 6 Daniel Walsh 2011-11-10 19:48:04 UTC
I think this label is better.

/var/spool/turboprint(/.*)?	gen_context(system_u:object_r:lpd_var_run_t,mls_systemhigh)


After all 

/var/spool/cups(/.*)?		gen_context(system_u:object_r:print_spool_t,mls_systemhigh)

Comment 8 Daniel Walsh 2011-11-11 15:43:09 UTC
Ok Miroslav has pointed out that this should be print_spool_t, I had a cut and paste error.

Comment 9 Fedora End Of Life 2012-08-07 19:58:46 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping


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