Bug 732054

Summary: SELinux is preventing /usr/bin/perl from 'unlink' accesses on the sock_file munin-master-processmanager-5997.sock.
Product: [Fedora] Fedora Reporter: Till Maas <opensource>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 15CC: dominick.grift, dwalsh, mgrepl, opensource
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:0d09ff42b337d42632918904159b6a345fd4d61c63e371d3c92c7cce6e86e04c
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-10-07 15:00:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Till Maas 2011-08-19 15:58:37 UTC
SELinux is preventing /usr/bin/perl from 'unlink' accesses on the sock_file munin-master-processmanager-5997.sock.

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

If you believe that perl should be allowed unlink access on the munin-master-processmanager-5997.sock sock_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 munin-update /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:munin_t:s0-s0:c0.c1023
Target Context                system_u:object_r:var_run_t:s0
Target Objects                munin-master-processmanager-5997.sock [ sock_file
                              ]
Source                        munin-update
Source Path                   /usr/bin/perl
Port                          <Unbekannt>
Host                          (removed)
Source RPM Packages           perl-5.12.4-160.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-35.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 2.6.40.3-0.fc15.x86_64 #1 SMP
                              Tue Aug 16 04:10:59 UTC 2011 x86_64 x86_64
Alert Count                   2186
First Seen                    Mo 08 Aug 2011 21:50:14 CEST
Last Seen                     Fr 19 Aug 2011 17:55:11 CEST
Local ID                      1d8e1dec-94d9-4446-806c-993dc7f69f48

Raw Audit Messages
type=AVC msg=audit(1313769311.376:2053): avc:  denied  { unlink } for  pid=5997 comm="munin-update" name="munin-master-processmanager-5997.sock" dev=tmpfs ino=261665 scontext=system_u:system_r:munin_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_run_t:s0 tclass=sock_file


type=SYSCALL msg=audit(1313769311.376:2053): arch=x86_64 syscall=unlink success=yes exit=0 a0=2aed2d0 a1=2bb26b8 a2=fffffffffffb9644 a3=0 items=0 ppid=5996 pid=5997 auid=487 uid=487 gid=470 euid=487 suid=487 fsuid=487 egid=470 sgid=470 fsgid=470 tty=(none) ses=217 comm=munin-update exe=/usr/bin/perl subj=system_u:system_r:munin_t:s0-s0:c0.c1023 key=(null)

Hash: munin-update,munin_t,var_run_t,sock_file,unlink

audit2allow

#============= munin_t ==============
allow munin_t var_run_t:sock_file unlink;

audit2allow -R

#============= munin_t ==============
allow munin_t var_run_t:sock_file unlink;

Comment 1 Miroslav Grepl 2011-08-22 10:38:47 UTC
Does

restorecon -R -v /var/run/munin

fix the issue?

Comment 2 Till Maas 2011-08-22 15:32:34 UTC
(In reply to comment #1)
> restorecon -R -v /var/run/munin

yes

Without it, it looked like this:
# ls -laZ /var/run/munin/
drwxr-xr-x. munin root system_u:object_r:var_run_t:s0   .
drwxr-xr-x. root  root system_u:object_r:var_run_t:s0   ..
-rw-r--r--. root  root system_u:object_r:munin_var_run_t:s0 munin-node.pid