[prev in list] [next in list] [prev in thread] [next in thread]
List: openbsd-tech
Subject: Re: snmpd: Move SNMPv2-SMI::snmpV2 to application_internal.c
From: Martijn van Duren <openbsd+tech () list ! imperialat ! at>
Date: 2023-10-29 19:14:56
Message-ID: 3d77b43273984cdf009eb15d7742596c746198ca.camel () list ! imperialat ! at
[Download RAW message or body]
On Sun, 2023-10-29 at 20:11 +0100, Martijn van Duren wrote:
> Similar reasoning and questions as the move of SNMPv2-MIB::snmp.
> This moves SNMP-FRAMEWORK-MIB::snmpEngine and
> SNMP-USER-BASED-SM-MIB::usmStats from mib.c to application_internal.c,
> under SNMPv2-SMI::snmpV2. The reason for this broader umbrella is that
> other backends have no business fiddling around under this region.
> Since different backends bite eachother with exclusive regions, both
> snmpEngine and usmStats must be moved at the same time.
>
> This change also breaks snmpd.sh from regress. This places a few custom
> OIDs in the usmUserTable, which is under snmpV2. Since these tests are
> mostly there to test snmp(1) I think it's worth removing these tests and
> build a proper snmp(1) regress suite another day (regress part in next
> mail)
>
> OK?
>
> martijn@
>
Here's the regress diff
Index: snmpd.sh
===================================================================
RCS file: /cvs/src/regress/usr.sbin/snmpd/snmpd.sh,v
retrieving revision 1.18
diff -u -p -r1.18 snmpd.sh
--- snmpd.sh 19 Jan 2022 11:02:38 -0000 1.18
+++ snmpd.sh 29 Oct 2023 19:14:33 -0000
@@ -271,8 +271,6 @@ read-write community non-default-rw
oid 1.3.6.1.4.1.30155.42.1 name myName read-only string "humppa"
oid 1.3.6.1.4.1.30155.42.2 name myStatus read-only integer 1
# No need to place a full index, we just need the object
-oid 1.3.6.1.6.3.15.1.2.2.1.3.1 name Reyk read-only string "Reyk Fl${oe}ter"
-oid 1.3.6.1.6.3.15.1.2.2.1.3.2 name broken read-only string "br${boe}ken"
EOF
(cd ${OBJDIR} && nohup snmpd -dvf ./snmpd.conf > snmpd.log 2>&1) &
@@ -344,38 +342,6 @@ fi
# echo "Setting of a ro custom oid test unexpectedly succeeded."
# FAILED=1
#fi
-
-snmp_command="snmp get -Oqv -v2c -c non-default-rw localhost \
- usmUserSecurityName.1.0"
-echo ======= $snmp_command
-reyk="$(eval LC_ALL=en_US.UTF-8 $snmp_command)"
-if [ "$reyk" != "Reyk Fl${oe}ter" ]
-then
- echo "Printing of UTF-8 string in UTF-8 locale failed"
- FAILED=1
-fi
-reyk="$(eval LC_ALL=C $snmp_command)"
-if [ "$reyk" != "Reyk Fl.ter" ]
-then
- echo "Printing of UTF-8 string in C locale failed"
- FAILED=1
-fi
-
-snmp_command="snmp get -Oqv -v2c -c non-default-rw localhost \
- usmUserSecurityName.2.0"
-echo ======= $snmp_command
-broken="$(eval LC_ALL=en_US.UTF-8 $snmp_command)"
-if [ "$broken" != "br${replacement}ken" ]
-then
- echo "Printing of UTF-8 replacement character failed"
- FAILED=1
-fi
-broken="$(eval LC_ALL=C $snmp_command)"
-if [ "$broken" != "br?ken" ]
-then
- echo "Printing of question mark in C locale failed"
- FAILED=1
-fi
kill $(pgrep snmpd) >/dev/null 2>&1
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic