Bug 461644 - SELinux is preventing snmpd (snmpd_t) "unlink" to master (var_t)
Summary: SELinux is preventing snmpd (snmpd_t) "unlink" to master (var_t)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy-targeted
Version: 5.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Daniel Walsh
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-09-09 17:38 UTC by Rich Johnson
Modified: 2012-10-16 08:33 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-20 21:30:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:0163 0 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2009-01-20 16:05:21 UTC

Description Rich Johnson 2008-09-09 17:38:13 UTC
Description of problem:
  Base policy contains no file context is defined for /var/agentx/master unix domain socket.  This is the default socket for establishing master<->subagent communications.

Version-Release number of selected component (if applicable):
  net-snmp-5.3.1-24.el5
  selinux-policy-targeted-2.4.6-137.el5

How reproducible:


Steps to Reproduce:
Method A:
1.  disable SELinux
2.  Configure snmpd with subagents.
3.  Verify snmpd is working correctly
4.  change SELinux enforcement to "enforcing"
5.  reboot to put changes into effect.
6.  Note SELinux exception.

Method B:
1.  Configure snmpd with subagents
2.  service snmpd stop
3.  restorecon -r /var/agentx
4.  service snmpd start
5.  Note SELinux exception.
  
Actual results:
  Relabeling places a var_t label on /var/agentx/master
  snmpd is prevented from communicating with its subagents 

Expected results:
  Relabeling places a snmpd_var_lib_t label on /var/agentx/master


Additional info:

Comment 1 Jan Safranek 2008-09-15 12:15:28 UTC
There must be something wrong in the policy - snmpd creates /var/agentx/master correctly with user_u:object_r:snmpd_var_lib_t context, but restorecon sets it to 'system_u:object_r:var_t', which is wrong.

Comment 2 Daniel Walsh 2008-09-15 16:34:14 UTC
Adding
/var/agentx(/.*)?		gen_context(system_u:object_r:snmpd_var_lib_t,s0)

To File Context
Fixed in selinux-policy-2.4.6-157

Comment 3 RHEL Program Management 2008-09-15 16:40:31 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 8 errata-xmlrpc 2009-01-20 21:30:43 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


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