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:
snmpd does not pass through snmpset 'string' types to 'pass' scripts.
This was fixed in upstream net-snmp 5.7.3 shortly after the version in RHEL7.
https://sourceforge.net/p/net-snmp/mailman/message/34272858/
Version-Release number of selected component (if applicable):
net-snmp 5.7.2
How reproducible:
Every time.
Steps to Reproduce:
I created a simple reproducer:
Slightly modified stock /etc/snmp/snmpd.conf
$ cat /etc/snmp/snmpd.conf | grep -v "^#\|^$"
com2sec notConfigUser default public
group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser
view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.25.1.1
view systemview included .1 <- Modified
access notConfigGroup "" any noauth exact systemview systemview none <- Modified
syslocation Unknown (edit /etc/snmp/snmpd.conf)
syscontact Root <root@localhost> (configure /etc/snmp/snmp.local.conf)
dontLogTCPWrappersConnects yes
pass 1.3.6.1.4.1.103.1.23.1 /root/passtest <- Modified
Simple test script that does nothing but write out the args:
$ cat passtest
#!/bin/bash
date >> /tmp/passtest.log
echo $\@ - $@ >> /tmp/passtest.log
Running snmpget works (error is due to simple script):
$ snmpget -v 1 -c public localhost .1.3.6.1.4.1.103.1.23.1
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: SNMPv2-SMI::enterprises.103.1.23.1
$ cat /tmp/passtest.log
Tue Apr 2 17:36:19 CDT 2019
$@ - -g .1.3.6.1.4.1.103.1.23.1
Running snmpset works for integer type:
$ snmpset -v 1 -c public localhost .1.3.6.1.4.1.103.1.23.1 integer 613
SNMPv2-SMI::enterprises.103.1.23.1 = INTEGER: 613
$ cat /tmp/passtest.log
Tue Apr 2 17:34:54 CDT 2019
$@ - -g .1.3.6.1.4.1.103.1.23.1
Tue Apr 2 17:34:54 CDT 2019
$@ - -s .1.3.6.1.4.1.103.1.23.1 integer 613
Running snmpset does NOT work for string type:
$ snmpset -v 1 -c public localhost .1.3.6.1.4.1.103.1.23.1 string "hello"
SNMPv2-SMI::enterprises.103.1.23.1 = STRING: "hello"
$ cat /tmp/passtest.log
Tue Apr 2 17:38:01 CDT 2019
$@ - -g .1.3.6.1.4.1.103.1.23.1
Tue Apr 2 17:38:01 CDT 2019
$@ - -s .1.3.6.1.4.1.103.1.23.1 string
Actual results:
snmpset is not passing the actual _string value_ when setting a 'string' oid
Expected results:
snmpset should also pass the actual _string value_ when setting a 'string' oid
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHSA-2020:1081