Bug 887328 - SELinux is preventing /usr/bin/perl from 'search' accesses on the directory /var/lib/munin.
Summary: SELinux is preventing /usr/bin/perl from 'search' accesses on the directory /...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 17
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:4af857cc98e219602a38b60149c...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-14 17:08 UTC by Till Maas
Modified: 2013-01-07 03:57 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-07 03:57:45 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Till Maas 2012-12-14 17:08:14 UTC
Description of problem:
This happened after I installed munin-cgi and started httpd.
SELinux is preventing /usr/bin/perl from 'search' accesses on the directory /var/lib/munin.

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

If sie denken, dass perl standardmässig erlaubt sein sollte, search Zugriff auf munin directory 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 munin-cgi-html /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:munin_var_lib_t:s0
Target Objects                /var/lib/munin [ dir ]
Source                        munin-cgi-html
Source Path                   /usr/bin/perl
Port                          <Unbekannt>
Host                          (removed)
Source RPM Packages           perl-5.14.3-218.fc17.x86_64
Target RPM Packages           munin-node-2.0.9-2.fc17.noarch
Policy RPM                    selinux-policy-3.10.0-161.fc17.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.6.10-2.fc17.x86_64 #1 SMP Tue
                              Dec 11 18:07:34 UTC 2012 x86_64 x86_64
Alert Count                   1
First Seen                    2012-12-14 18:01:42 CET
Last Seen                     2012-12-14 18:01:42 CET
Local ID                      0cedb2e8-1211-45b6-bfe0-df1b2f2f195f

Raw Audit Messages
type=AVC msg=audit(1355504502.993:127): avc:  denied  { search } for  pid=4452 comm="munin-cgi-html" name="munin" dev="dm-1" ino=676520 scontext=system_u:system_r:httpd_sys_script_t:s0 tcontext=system_u:object_r:munin_var_lib_t:s0 tclass=dir


type=SYSCALL msg=audit(1355504502.993:127): arch=x86_64 syscall=stat success=no exit=EACCES a0=1aeab90 a1=172b138 a2=172b138 a3=0 items=0 ppid=4409 pid=4452 auid=4294967295 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=4294967295 comm=munin-cgi-html exe=/usr/bin/perl subj=system_u:system_r:httpd_sys_script_t:s0 key=(null)

Hash: munin-cgi-html,httpd_sys_script_t,munin_var_lib_t,dir,search

audit2allow

#============= httpd_sys_script_t ==============
allow httpd_sys_script_t munin_var_lib_t:dir search;

audit2allow -R

#============= httpd_sys_script_t ==============
allow httpd_sys_script_t munin_var_lib_t:dir search;


Additional info:
hashmarkername: setroubleshoot
kernel:         3.6.10-2.fc17.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2012-12-17 11:21:30 UTC
Try to label munin-cgi-html CGI script using

# chcon -t httpd_munin_script_exec_t PATHO/munin-cgi-html

Also what does

# rpm -qf PATHO/munin-cgi-html

Comment 2 Till Maas 2012-12-18 00:04:49 UTC
(In reply to comment #1)
> Try to label munin-cgi-html CGI script using
> 
> # chcon -t httpd_munin_script_exec_t PATHO/munin-cgi-html
> 

see bug 887327 comment 4

> Also what does
> 
> # rpm -qf PATHO/munin-cgi-html

It is in munin-cgi:

munin-cgi-2.0.9-2.fc17.noarch

Comment 3 Miroslav Grepl 2012-12-18 12:22:14 UTC
I added fixes.

Comment 4 Fedora Update System 2013-01-03 13:05:50 UTC
selinux-policy-3.10.0-166.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/FEDORA-2012-20544/selinux-policy-3.10.0-166.fc17

Comment 5 Fedora Update System 2013-01-05 06:37:54 UTC
Package selinux-policy-3.10.0-166.fc17:
* should fix your issue,
* was pushed to the Fedora 17 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.10.0-166.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-20544/selinux-policy-3.10.0-166.fc17
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2013-01-07 03:57:46 UTC
selinux-policy-3.10.0-166.fc17 has been pushed to the Fedora 17 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.