Bug 461040

Summary: Selinux policy prevents freeradius to communicate with net-snmp
Product: Red Hat Enterprise Linux 5 Reporter: Michal Marciniszyn <mmarcini>
Component: selinux-policy-targetedAssignee: Daniel Walsh <dwalsh>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.2CC: dwalsh, mmalik, tvujec
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-20 21:30:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michal Marciniszyn 2008-09-03 16:05:01 UTC
Description of problem:
The default targeted policy prevents freeradius to connect to net-snmp socket as smux client. In certain configurations, this is desired behavior.

Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:
1. Edit /etc/snmp/snmpd.conf, add these lines:
   smuxpeer 1.3.6.1.4.1.3317.1.3.1. verysecret
   view    systemview    included   .1.3.6.1.2.1.67

2. Edit /etc/raddb/radiusd.conf, find "snmp = no", change to "snmp = yes"

3. Edit /etc/raddb/snmp.conf, make sure the smux_password is set (should be able
to just uncomment the line), e.g.:
   smux_password = verysecret

4. Restart the snmp and radius services:
   % service snmpd restart
   % service radiusd restart

5. Perform a snmp walk on the radius mibs:
   % snmpwalk -c public -v2c localhost 1.3.6.1.2.1.67
  
Actual results:
net-snmp and freeradius are unable to communicate. To get avc, it is necessary to install enableaudit base module. 

Expected results:
freeradius should be able to connect to net-snmp

Additional info:
IMHO adding boolean is good idea, while this behavior is desired it is not always needed. The allow rule is
allow radiusd_t snmp_port_t:tcp_socket name_connect;

Comment 1 Daniel Walsh 2008-09-03 18:19:26 UTC
Fixed in selinux-policy-2.4.6-152.el5

Comment 2 RHEL Program Management 2008-09-03 18:23:54 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 7 errata-xmlrpc 2009-01-20 21:30:35 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0163.html