Description of problem: When munin-node runs plugins that have iptables or ethtool (possibly other tools as well), selinux denies the processes access to the pipe where data is read, and denies append to the munin-node log file. avc: denied { read, write } for comm="ethtool" dev=sockfs egid=495 euid=99 exe="/sbin/ethtool" exit=0 fsgid=495 fsuid=99 gid=495 items=0 name="" path="socket:[880054]" pid=5282 scontext=user_u:system_r:ifconfig_t:s0 sgid=495 subj=user_u:system_r:ifconfig_t:s0 suid=99 tclass=tcp_socket tcontext=user_u:system_r:initrc_t:s0 tty=(none) uid=99 avc: denied { append } for comm="iptables" dev=dm-0 egid=495 euid=0 exe="/sbin/iptables" exit=0 fsgid=495 fsuid=0 gid=495 items=0 name="munin- node.log" path="/var/log/munin/munin-node.log" pid=5018 scontext=user_u:system_r:iptables_t:s0 sgid=495 subj=user_u:system_r:iptables_t:s0 suid=0 tclass=file tcontext=user_u:object_r:var_log_t:s0 tty=(none) uid=0 Version-Release number of selected component (if applicable): munin-node-1.2.5-2.fc7 selinux-policy-targeted-2.6.4-33.fc7
Sounds like munin-node needs a policy. You can allow these permissions via audit2allow -a -l -M mymunin semodule -i mymunin.pp
When I use audit2allow, I get: module muninnode 1.0; require { type ifconfig_t; type var_log_t; type iptables_t; type initrc_t; class tcp_socket { read write }; class file append; } #============= ifconfig_t ============== allow ifconfig_t initrc_t:tcp_socket { read write }; #============= iptables_t ============== allow iptables_t initrc_t:tcp_socket { read write }; allow iptables_t var_log_t:file append; Is there a way of only giving ifconfig_t and iptables_t access to sockets and logs created by munin-node? At the moment it looks like this will give iptables and ifconfig access to write to any socket and append to any log.
Yes we need a policy written for munin. If you want to take a stab... http://www.redhatmagazine.com/2007/08/21/a-step-by-step-guide-to-building-a-new-selinux-policy-module/
Fixed in selinux-policy-3.0.8-56.fc8
Bulk closing all bugs in Fedora updates in the modified state. If you bug is not fixed, please reopen.