Bug 878645 - SELinux is preventing /usr/sbin/snmpd from 'read' accesses on the file snmpd.conf.
Summary: SELinux is preventing /usr/sbin/snmpd from 'read' accesses on the file snmpd....
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 17
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:5330305e158594fa120644e0cb7...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-20 20:56 UTC by Micah Shennum
Modified: 2012-11-24 01:13 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-11-21 10:52:22 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: type (9 bytes, text/plain)
2012-11-20 20:56 UTC, Micah Shennum
no flags Details
File: hashmarkername (14 bytes, text/plain)
2012-11-20 20:56 UTC, Micah Shennum
no flags Details

Description Micah Shennum 2012-11-20 20:56:36 UTC
Description of problem:
I created a new snmpd.conf using snmpconf and copyed it to /etc/snmp/

Additional info:
libreport version: 2.0.18
kernel:         3.6.6-1.fc17.x86_64

description:
:SELinux is preventing /usr/sbin/snmpd from 'read' accesses on the file snmpd.conf.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that snmpd should be allowed read access on the snmpd.conf 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 snmpd /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:snmpd_t:s0
:Target Context                unconfined_u:object_r:user_home_t:s0
:Target Objects                snmpd.conf [ file ]
:Source                        snmpd
:Source Path                   /usr/sbin/snmpd
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           net-snmp-5.7.1-5.fc17.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-159.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.6.6-1.fc17.x86_64 #1 SMP Mon Nov
:                              5 21:59:35 UTC 2012 x86_64 x86_64
:Alert Count                   1
:First Seen                    2012-11-20 14:54:48 CST
:Last Seen                     2012-11-20 14:54:48 CST
:Local ID                      1b3a176b-095c-4a63-9b16-824d7bd03398
:
:Raw Audit Messages
:type=AVC msg=audit(1353444888.683:232): avc:  denied  { read } for  pid=9535 comm="snmpd" name="snmpd.conf" dev="dm-1" ino=1180388 scontext=system_u:system_r:snmpd_t:s0 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file
:
:
:type=SYSCALL msg=audit(1353444888.683:232): arch=x86_64 syscall=open success=no exit=EACCES a0=7fff96de78a0 a1=0 a2=1b6 a3=238 items=0 ppid=1 pid=9535 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=snmpd exe=/usr/sbin/snmpd subj=system_u:system_r:snmpd_t:s0 key=(null)
:
:Hash: snmpd,snmpd_t,user_home_t,file,read
:
:audit2allow
:
:#============= snmpd_t ==============
:allow snmpd_t user_home_t:file read;
:
:audit2allow -R
:
:#============= snmpd_t ==============
:allow snmpd_t user_home_t:file read;
:
:I created a new snmpd.conf using snmpconf

Comment 1 Micah Shennum 2012-11-20 20:56:38 UTC
Created attachment 648831 [details]
File: type

Comment 2 Micah Shennum 2012-11-20 20:56:39 UTC
Created attachment 648832 [details]
File: hashmarkername

Comment 3 Miroslav Grepl 2012-11-21 10:52:22 UTC
You need to fix labeling. 

# restorecon -R -v /etc/snmp/

Comment 4 Micah Shennum 2012-11-24 01:13:49 UTC
Thank you, everything seems to work well now.


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