Bug 998115

Summary: SELinux is preventing /usr/bin/gs from 'read' accesses on the directory /usr/share/fonts/msttcorefonts.
Product: [Fedora] Fedora Reporter: Titas Chanda <titas.chanda>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:a61aa833e864e4bda0bf680c7b22280e738de07f8c221147227d7480d695908f
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-20 07:46:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Titas Chanda 2013-08-17 11:52:01 UTC
Description of problem:
SELinux is preventing /usr/bin/gs from 'read' accesses on the directory /usr/share/fonts/msttcorefonts.

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

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

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

If you believe that gs should be allowed read access on the msttcorefonts 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 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 [ dir ]
Source                        gs
Source Path                   /usr/bin/gs
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           poppler-utils-0.22.1-4.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-69.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.10.6-200.fc19.x86_64 #1 SMP Mon
                              Aug 12 14:49:42 UTC 2013 x86_64 x86_64
Alert Count                   5
First Seen                    2013-08-11 19:24:02 IST
Last Seen                     2013-08-17 16:18:54 IST
Local ID                      8f9c693e-d0d4-4332-9fb3-1096be63c4d0

Raw Audit Messages
type=AVC msg=audit(1376736534.526:784): avc:  denied  { read } for  pid=12467 comm="pdftops" name="msttcorefonts" dev="sda1" ino=1048748 scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_tmp_t:s0 tclass=dir


type=SYSCALL msg=audit(1376736534.526:784): arch=x86_64 syscall=open success=yes exit=E2BIG a0=1696da0 a1=80000 a2=7fff5e0b2390 a3=3 items=0 ppid=12465 pid=12467 auid=4294967295 uid=4 gid=7 euid=4 suid=4 fsuid=4 egid=7 sgid=7 fsgid=7 ses=4294967295 tty=(none) comm=pdftops exe=/usr/bin/pdftops subj=system_u:system_r:cupsd_t:s0-s0:c0.c1023 key=(null)

Hash: gs,cupsd_t,user_tmp_t,dir,read

Additional info:
reporter:       libreport-2.1.6
hashmarkername: setroubleshoot
kernel:         3.10.6-200.fc19.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2013-08-20 07:46:55 UTC
If you want to fix the label. 
/usr/share/fonts/msttcorefonts default label should be fonts_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /usr/share/fonts/msttcorefonts