Bug 826166 - SELinux is preventing /bin/bash from 'execute' accesses on the file /etc/munin/plugins/sntp.sh
SELinux is preventing /bin/bash from 'execute' accesses on the file /etc/muni...
Product: Fedora
Classification: Fedora
Component: munin (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Kevin Fenzi
Fedora Extras Quality Assurance
: Reopened
Depends On:
  Show dependency treegraph
Reported: 2012-05-29 14:08 EDT by Till Maas
Modified: 2012-08-07 15:56 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-08-07 15:56:23 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Till Maas 2012-05-29 14:08:56 EDT
*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that bash should be allowed execute access on the sntp.sh file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
allow this access for now by executing:
# grep sntp.sh /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:munin_t:s0
Target Context                unconfined_u:object_r:munin_etc_t:s0
Target Objects                /etc/munin/plugins/sntp.sh [ file ]
Source                        sntp.sh
Source Path                   /bin/bash
Port                          <Unbekannt>
Host                          (removed)
Source RPM Packages           bash-4.2.10-4.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-52.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) #1 SMP
                              Tue May 22 14:23:34 UTC 2012 x86_64 x86_64
Alert Count                   3751
First Seen                    Sa 12 Mai 2012 12:13:58 CEST
Last Seen                     Di 29 Mai 2012 19:55:10 CEST
Local ID                      26d76b89-412f-4057-ad56-07d46568ea68

Raw Audit Messages
type=AVC msg=audit(1338314110.635:3119): avc:  denied  { execute } for  pid=3891 comm="munin-node" name="sntp.sh" dev="dm-2" ino=2807 scontext=system_u:system_r:munin_t:s0 tcontext=unconfined_u:object_r:munin_etc_t:s0 tclass=file

type=AVC msg=audit(1338314110.635:3119): avc:  denied  { execute_no_trans } for  pid=3891 comm="munin-node" path="/etc/munin/plugins/sntp.sh" dev="dm-2" ino=2807 scontext=system_u:system_r:munin_t:s0 tcontext=unconfined_u:object_r:munin_etc_t:s0 tclass=file

type=SYSCALL msg=audit(1338314110.635:3119): arch=x86_64 syscall=execve success=yes exit=0 a0=1488430 a1=184f550 a2=18b3f10 a3=8 items=0 ppid=3370 pid=3891 auid=4294967295 uid=99 gid=470 euid=99 suid=99 fsuid=99 egid=470 sgid=470 fsgid=470 tty=(none) ses=4294967295 comm=sntp.sh exe=/bin/bash subj=system_u:system_r:munin_t:s0 key=(null)

Hash: sntp.sh,munin_t,munin_etc_t,file,execute


#============= munin_t ==============
allow munin_t munin_etc_t:file { execute execute_no_trans };

audit2allow -R

#============= munin_t ==============
allow munin_t munin_etc_t:file { execute execute_no_trans };

Additional info:
I wrote my own plugin for munin (sntp.sh) and put it into /et/munin/plugins. This seems to be the appropiate location or is there a better one?
Comment 1 Daniel Walsh 2012-05-29 14:53:17 EDT
chcon -Rt bin_t /etc/munin/plugins/

Should fix this.
Comment 2 Daniel Walsh 2012-05-29 14:56:42 EDT
I just updated F17 policy for this. But we will not be fixing this in F15, since it is nearing end of life.  the chcon command should fix your problem.
Comment 3 Miroslav Grepl 2012-05-29 16:09:09 EDT
So plugins can be also located in the /etc/munin/plugins?

I think 


is better place. We have labeling for them in this directory.
Comment 4 Till Maas 2012-05-29 16:13:55 EDT
(In reply to comment #3)
> So plugins can be also located in the /etc/munin/plugins?
> I think 
> /usr/share/munin/plugins
> is better place. We have labeling for them in this directory.

The usual way is to symlink plugins from /usr/share/munin/plugins in /etc/munin/plugins. But for unpackaged plugins it would be wrong to move them to /usr/share/munin/plugins.
Comment 5 Miroslav Grepl 2012-05-29 16:32:58 EDT
Yeap, I thought it for default plugins.
Comment 6 Fedora End Of Life 2012-08-07 15:56:26 EDT
This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

The process we are following is described here:

Note You need to log in before you can comment on or make changes to this bug.