Bug 671171

Summary: SELinux is preventing /usr/bin/pdftex from 'getattr' accesses on the directory /var/lib/texmf.
Product: [Fedora] Fedora Reporter: Joel James Adamson <adamsonj>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 14CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:4f5920d7eb822413d798c31c0a8e4cbd812c8424e5c2251e3fa714d708f5bdbe
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-20 20:17:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Joel James Adamson 2011-01-20 16:55:16 UTC
SELinux is preventing /usr/bin/pdftex from 'getattr' accesses on the directory /var/lib/texmf.

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

If you believe that pdftex should be allowed getattr access on the texmf 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 latex /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:httpd_sys_script_t:s0
Target Context                system_u:object_r:httpd_mediawiki_tmp_t:s0
Target Objects                /var/lib/texmf [ dir ]
Source                        latex
Source Path                   /usr/bin/pdftex
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           texlive-2007-56.fc14
Target RPM Packages           texlive-texmf-2007-36.fc14
Policy RPM                    selinux-policy-3.9.7-20.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.35.9-64.fc14.x86_64 #1 SMP Fri Dec 3 12:19:41
                              UTC 2010 x86_64 x86_64
Alert Count                   52
First Seen                    Tue 04 Jan 2011 02:39:40 PM EST
Last Seen                     Thu 20 Jan 2011 11:50:46 AM EST
Local ID                      dc982f1b-328b-4be1-bc95-89e12be83a4a

Raw Audit Messages
type=AVC msg=audit(1295542246.720:35099): avc:  denied  { getattr } for  pid=21827 comm="kpsewhich" path="/var/lib/texmf" dev=dm-0 ino=425964 scontext=system_u:system_r:httpd_sys_script_t:s0 tcontext=system_u:object_r:httpd_mediawiki_tmp_t:s0 tclass=dir

latex,httpd_sys_script_t,httpd_mediawiki_tmp_t,dir,getattr
type=SYSCALL msg=audit(1295542246.720:35099): arch=x86_64 syscall=stat success=no exit=EACCES a0=120bb60 a1=7fffea958ff0 a2=7fffea958ff0 a3=5 items=0 ppid=21826 pid=21827 auid=4294967295 uid=48 gid=493 euid=48 suid=48 fsuid=48 egid=493 sgid=493 fsgid=493 tty=(none) ses=4294967295 comm=kpsewhich exe=/usr/bin/kpsewhich subj=system_u:system_r:httpd_sys_script_t:s0 key=(null)
latex,httpd_sys_script_t,httpd_mediawiki_tmp_t,dir,getattr

#============= httpd_sys_script_t ==============
#!!!! This avc is allowed in the current policy

allow httpd_sys_script_t httpd_mediawiki_tmp_t:dir getattr;

Comment 1 Daniel Walsh 2011-01-20 20:17:03 UTC
matchpathcon /var/lib/texmf
/var/lib/texmf	system_u:object_r:tetex_data_t:s0


You have mislabeled this directory.

restorecon -R -v /var/lib/texmf 

Should fix.