Bug 1199278 - SELinux is preventing /usr/sbin/collectd from 'write' accesses on the directory /var/lib/net-snmp/mib_indexes.
Summary: SELinux is preventing /usr/sbin/collectd from 'write' accesses on the directo...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 21
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:df568db1be09261a4cedc40b188...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-05 19:44 UTC by Mads Villadsen
Modified: 2015-03-31 21:46 UTC (History)
5 users (show)

Fixed In Version: selinux-policy-3.13.1-105.9.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-31 21:46:39 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Mads Villadsen 2015-03-05 19:44:17 UTC
Description of problem:
Installed collectd and collectd-snmp. Configured to use snmp plugin and started collectd. Got selinux error.
SELinux is preventing /usr/sbin/collectd from 'write' accesses on the directory /var/lib/net-snmp/mib_indexes.

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

If you believe that collectd should be allowed write access on the mib_indexes directory 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 collectd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:collectd_t:s0
Target Context                system_u:object_r:snmpd_var_lib_t:s0
Target Objects                /var/lib/net-snmp/mib_indexes [ dir ]
Source                        collectd
Source Path                   /usr/sbin/collectd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           collectd-5.4.1-8.fc21.x86_64
Target RPM Packages           net-snmp-libs-5.7.2-23.fc21.x86_64
Policy RPM                    selinux-policy-3.13.1-105.3.fc21.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.18.7-200.fc21.x86_64 #1 SMP Wed
                              Feb 11 21:53:17 UTC 2015 x86_64 x86_64
Alert Count                   3
First Seen                    2015-03-05 20:40:11 CET
Last Seen                     2015-03-05 20:40:57 CET
Local ID                      30a5f019-1fc6-4e0d-83ab-86f2c262b27d

Raw Audit Messages
type=AVC msg=audit(1425584457.534:1034): avc:  denied  { write } for  pid=8281 comm="collectd" name="mib_indexes" dev="dm-0" ino=917721 scontext=system_u:system_r:collectd_t:s0 tcontext=system_u:object_r:snmpd_var_lib_t:s0 tclass=dir permissive=0


type=SYSCALL msg=audit(1425584457.534:1034): arch=x86_64 syscall=open success=no exit=EACCES a0=7fff74f80a90 a1=241 a2=1b6 a3=241 items=0 ppid=1 pid=8281 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=collectd exe=/usr/sbin/collectd subj=system_u:system_r:collectd_t:s0 key=(null)

Hash: collectd,collectd_t,snmpd_var_lib_t,dir,write

Version-Release number of selected component:
selinux-policy-3.13.1-105.3.fc21.noarch

Additional info:
reporter:       libreport-2.3.0
hashmarkername: setroubleshoot
kernel:         3.18.7-200.fc21.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2015-03-09 09:47:58 UTC
commit 38ed16ee7887081c0adc9cfaeed55d5a4d0467cd
Author: Lukas Vrabec <lvrabec>
Date:   Mon Mar 9 10:47:05 2015 +0100

    Allow collectd to write to smnpd_var_lib_t dirs. BZ(1199278)

Comment 2 Fedora Update System 2015-03-23 16:48:01 UTC
selinux-policy-3.13.1-105.9.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/selinux-policy-3.13.1-105.9.fc21

Comment 3 Fedora Update System 2015-03-26 21:28:19 UTC
Package selinux-policy-3.13.1-105.9.fc21:
* should fix your issue,
* was pushed to the Fedora 21 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.13.1-105.9.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-4492/selinux-policy-3.13.1-105.9.fc21
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2015-03-31 21:46:39 UTC
selinux-policy-3.13.1-105.9.fc21 has been pushed to the Fedora 21 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.