Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
Configure snmpd to use a pass_persist program which reads data from a file in /var/run/net-snmp. The program runs as root but is denied read access to the file.
Version-Release number of selected component (if applicable):
net-snmp-5.5-37.el6_2.1.x86_64
selinux-policy-3.7.19-126.el6_2.10.noarch
How reproducible:
Always
Steps to Reproduce:
1. Run root cron job to write to a file in /var/run/net-snmp
2. Configure /etc/snmp/snmpd.conf to run a program using the pass_persist directive which reads the above file.
3. The program will run via snmpd but is denied read access.
4. Running 'semodule -DB' will show the AVCs in /var/log/audit/audit.log
Actual results:
No output from the pass_persist program, so snmpd gives the error (in my case):
SNMPv2-SMI::enterprises.141.1.1.10 = No Such Instance currently
exists at this OID
Expected results:
Snmpd should have read access to anything in /var/run/net-snmp, so SNMP results should be read and returned to snmpd.
Additional info:
This was discussed on the CentOS mailing list, but has been confirmed on our RHEL 6.2 system as well:
http://lists.centos.org/pipermail/centos/2012-May/126403.html
Sorry, should have added this:
By default '/var/run/net-snmp' has the context 'system_u:object_r:var_run_t:s0'.
If I run:
chcon -t snmpd_var_run_t /var/run/net-snmp
then the pass_persist program works fine via snmpd.