Bug 1045822 - SELinux is preventing /usr/bin/gs from 'open' accesses on the file /usr/share/fonts/msttcorefonts/couri.ttf.
Summary: SELinux is preventing /usr/bin/gs from 'open' accesses on the file /usr/share...
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 20
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:53ecb403e64748d1cf3b007f6cf...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-22 10:09 UTC by Alessio Caiazza
Modified: 2014-01-02 23:17 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-02 23:17:27 UTC
Type: ---


Attachments (Terms of Use)

Description Alessio Caiazza 2013-12-22 10:09:12 UTC
Description of problem:
Just printed a test page with an HP printer.
I've MS fonts intalled.
SELinux is preventing /usr/bin/gs from 'open' accesses on the file /usr/share/fonts/msttcorefonts/couri.ttf.

*****  Plugin restorecon (99.5 confidence) suggests   ************************

If you want to fix the label. 
/usr/share/fonts/msttcorefonts/couri.ttf default label should be fonts_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /usr/share/fonts/msttcorefonts/couri.ttf

*****  Plugin catchall (1.49 confidence) suggests   **************************

If you believe that gs should be allowed open access on the couri.ttf 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 gs /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:user_tmp_t:s0
Target Objects                /usr/share/fonts/msttcorefonts/couri.ttf [ file ]
Source                        gs
Source Path                   /usr/bin/gs
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           ghostscript-9.10-5.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-106.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.11.10-301.fc20.x86_64 #1 SMP Thu
                              Dec 5 14:01:17 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-12-22 11:06:41 CET
Last Seen                     2013-12-22 11:06:41 CET
Local ID                      5033f5e3-53ed-4800-8c50-378c15308fea

Raw Audit Messages
type=AVC msg=audit(1387706801.141:1358): avc:  denied  { open } for  pid=12759 comm="gs" path="/usr/share/fonts/msttcorefonts/couri.ttf" dev="dm-1" ino=932003 scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_tmp_t:s0 tclass=file


type=SYSCALL msg=audit(1387706801.141:1358): arch=x86_64 syscall=open success=yes exit=EFAULT a0=269bc68 a1=0 a2=1b6 a3=1 items=0 ppid=12758 pid=12759 auid=4294967295 uid=4 gid=7 euid=4 suid=4 fsuid=4 egid=7 sgid=7 fsgid=7 ses=4294967295 tty=(none) comm=gs exe=/usr/bin/gs subj=system_u:system_r:cupsd_t:s0-s0:c0.c1023 key=(null)

Hash: gs,cupsd_t,user_tmp_t,file,open

Additional info:
reporter:       libreport-2.1.10
hashmarkername: setroubleshoot
kernel:         3.11.10-301.fc20.x86_64
type:           libreport

Potential duplicate: bug 880348

Comment 1 Daniel Walsh 2014-01-02 23:17:27 UTC
*****  Plugin restorecon (99.5 confidence) suggests   ************************

If you want to fix the label. 
/usr/share/fonts/msttcorefonts/couri.ttf default label should be fonts_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /usr/share/fonts/msttcorefonts/couri.ttf

I would run 

restorecon -R -v /usr/share/fonts

It looks like the tool that created these fonts created them in /tmp and then mv'd them to /usr/share/fonts.


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