Bug 731181

Summary: Selinux prevents munin cron correct execution
Product: [Fedora] Fedora Reporter: Johan Cwiklinski <fedora>
Component: muninAssignee: Kevin Fenzi <kevin>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: drjohnson1, ingvar, kevin
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: munin-1.4.6-4.fc15.1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-18 21:27:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
ausearch results none

Description Johan Cwiklinski 2011-08-16 20:36:24 UTC
Description of problem:
Munin's cron job (running every 5 minutes) causes SELinux denials. I do not know if it's munin or selinux policy related.

Version-Release number of selected component (if applicable):
munin-1.4.6-1.fc15.noarch
selinux-policy-targeted-3.9.16-35.fc15.noarch
selinux-policy-3.9.16-35.fc15.noarch


How reproducible:
Just install munin

  
Actual results:
SELinux denials, munin not updated


Expected results:
Works :)


Additional info:
Running SELinux in permissive mode give the following messages :
Aug 16 22:25:04 trinity setroubleshoot: SELinux is preventing /usr/bin/perl from create access on the sock_file munin-master-processmanager-23659.sock. For complete SELinux messages. run sealert -l 76eb03da-403a-4c40-b049-5667bb5858e1
Aug 16 22:25:04 trinity setroubleshoot: SELinux is preventing /usr/bin/perl from setattr access on the sock_file munin-master-processmanager-23659.sock. For complete SELinux messages. run sealert -l a8e285b0-b261-4803-bb20-a870de18d140
Aug 16 22:25:05 trinity setroubleshoot: SELinux is preventing /usr/bin/perl from write access on the sock_file munin-master-processmanager-23659.sock. For complete SELinux messages. run sealert -l 620c8b6a-43ab-477d-b4e1-9ff80df93161
Aug 16 22:25:11 trinity setroubleshoot: SELinux is preventing /usr/bin/perl from unlink access on the sock_file munin-master-processmanager-23659.sock. For complete SELinux messages. run sealert -l 2a131c43-8eaf-4ce4-8e7e-da311c2f0846

Comment 1 d. johnson 2011-08-17 00:50:54 UTC
Could you attach the output of the following?

su -c 'ausearch -m avc -ts today > /tmp/munin-master-processmanager.txt'

Thank you in advance.




-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 2 Johan Cwiklinski 2011-08-18 16:19:53 UTC
Created attachment 518903 [details]
ausearch results

Comment 3 d. johnson 2011-08-18 20:28:20 UTC
Thank you for the update.  Can you run this next?

su -c 'restorecon -Rv /var /run'

It looks like you may have some mislabeled files in there that are affecting httpd and munin.  After that completes, do you still get AVC's?


Did you move any of the locations for where munin or httpd access files?

If so, this may help:

https://docs.fedoraproject.org/en-US/Fedora/13/html/Managing_Confined_Services/chap-Managing_Confined_Services-The_Apache_HTTP_Server.html


#============= httpd_t ==============
allow httpd_t httpd_log_t:file write;

#============= munin_t ==============
allow munin_t var_run_t:sock_file { write create unlink setattr };




-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 4 Johan Cwiklinski 2011-08-18 21:27:24 UTC
Hello,

Restorecon seems to solve the problem:
restorecon reset /var/run/munin context system_u:object_r:var_run_t:s0->system_u:object_r:munin_var_run_t:s0

I did not change anything; just did a 'yum install munin' on a fresh F-15 install.

Well, problem is solved, thanks you for the help :)

Comment 5 Fedora Update System 2011-08-21 01:16:51 UTC
munin-1.4.6-4.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/munin-1.4.6-4.fc16

Comment 6 Fedora Update System 2011-08-21 01:51:00 UTC
munin-1.4.6-4.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/munin-1.4.6-4.fc15

Comment 7 Fedora Update System 2011-08-27 23:54:15 UTC
munin-1.4.6-4.fc15.1 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/munin-1.4.6-4.fc15.1

Comment 8 Fedora Update System 2011-08-30 20:48:28 UTC
munin-1.4.6-4.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2011-09-13 05:53:24 UTC
munin-1.4.6-4.fc15.1 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.