# HG changeset patch # User Tomas Klacko # Date 1399026209 -7200 # Node ID 1940d0927363027489bc4f8be3b71116117e78df # Parent f0ad806e26ab7005c246a9e533fe255b9a732347 17758422 50 or more exec options in snmpd.conf results in errors diff -r f0ad806e26ab -r 1940d0927363 components/net-snmp/patches/042.16634190.kernel_sunos5.patch --- a/components/net-snmp/patches/042.16634190.kernel_sunos5.patch Wed Apr 30 01:05:43 2014 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ -This patch fixes a Solaris specific issue related to incorrect -reporting of network interface speed inside a zone. The patch has -been submitted to the community but has not been accepted yet. - -The details can be found in the following location -https://sourceforge.net/p/net-snmp/patches/1277/ ---- net-snmp-5.4.1.old/agent/mibgroup/kernel_sunos5.c 2014-03-28 14:54:11.259600880 -0400 -+++ net-snmp-5.4.1/agent/mibgroup/kernel_sunos5.c 2014-03-28 14:52:32.837130820 -0400 -@@ -1908,8 +1908,10 @@ - * this is good - */ - havespeed = B_TRUE; -+ } else if ((getKstatInt("link", name, "ifspeed", &ifp->ifSpeed) == 0) || -+ (getKstatInt("link", name, "ifSpeed", &ifp->ifSpeed) == 0)) { -+ havespeed = B_TRUE; - } -- - /* make ifOperStatus depend on link status if available */ - if (ifp->ifAdminStatus == 1) { - int i_tmp; diff -r f0ad806e26ab -r 1940d0927363 components/net-snmp/patches/042.17758422.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/net-snmp/patches/042.17758422.patch Fri May 02 12:23:29 2014 +0200 @@ -0,0 +1,31 @@ +This has been fixed in upstream version 5.7.2 (see README). +http://sourceforge.net/p/net-snmp/code/ci/4d38895f459a1df24f68c4a60e4caf6a778d8c1f + +--- a/agent/mibgroup/agent/extend.c ++++ b/agent/mibgroup/agent/extend.c +@@ -473,10 +473,21 @@ extend_parse_config(const char *token, char *cptr) + + } else if (!strcmp( token, "sh" ) || + !strcmp( token, "exec" )) { +- if ( num_compatability_entries == max_compatability_entries ) ++ if ( num_compatability_entries == max_compatability_entries ) { + /* XXX - should really use dynamic allocation */ +- config_perror("No further UCD-compatible entries" ); +- else ++ netsnmp_old_extend *new_compatability_entries; ++ new_compatability_entries = realloc(compatability_entries, ++ max_compatability_entries*2*sizeof(netsnmp_old_extend)); ++ if (!new_compatability_entries) ++ config_perror("No further UCD-compatible entries" ); ++ else { ++ memset(new_compatability_entries+num_compatability_entries, 0, ++ sizeof(netsnmp_old_extend)*max_compatability_entries); ++ max_compatability_entries *= 2; ++ compatability_entries = new_compatability_entries; ++ } ++ } ++ if (num_compatability_entries != max_compatability_entries) + compatability_entries[ + num_compatability_entries++ ].exec_entry = extension; + } + diff -r f0ad806e26ab -r 1940d0927363 components/net-snmp/patches/043.15805491.hr_filesys.patch --- a/components/net-snmp/patches/043.15805491.hr_filesys.patch Wed Apr 30 01:05:43 2014 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -This patch taken from the net-snmp community fixes an issue related to mismatch of the -indices in the host resources tables for monitoring disk storage. - -The details for the upstream bug/patch are given below. -BUG: 1557372: Realign hrFSStorageIndex with hrStorageTable -http://net-snmp.svn.sourceforge.net/viewvc/net-snmp?view=revision&revision=17138 - ---- net-snmp-5.4.1.old/agent/mibgroup/host/hr_filesys.c 2014-03-25 07:06:17.172039070 -0400 -+++ net-snmp-5.4.1/agent/mibgroup/host/hr_filesys.c 2014-03-25 07:10:05.467869740 -0400 -@@ -4,6 +4,9 @@ - */ - - #include -+#include -+#include -+#include - #include "host_res.h" - #include "hr_filesys.h" - #include "hr_storage.h" -@@ -546,7 +549,7 @@ - long_return = 2; /* others probably aren't */ - return (u_char *) & long_return; - case HRFSYS_STOREIDX: -- long_return = fsys_idx + HRS_TYPE_FIXED_MAX; -+ long_return = fsys_idx + NETSNMP_MEM_TYPE_MAX; - return (u_char *) & long_return; - case HRFSYS_FULLDUMP: - return when_dumped(HRFS_entry->HRFS_name, FULL_DUMP, var_len); diff -r f0ad806e26ab -r 1940d0927363 components/net-snmp/patches/043.16634190.kernel_sunos5.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/net-snmp/patches/043.16634190.kernel_sunos5.patch Fri May 02 12:23:29 2014 +0200 @@ -0,0 +1,20 @@ +This patch fixes a Solaris specific issue related to incorrect +reporting of network interface speed inside a zone. The patch has +been submitted to the community but has not been accepted yet. + +The details can be found in the following location +https://sourceforge.net/p/net-snmp/patches/1277/ +--- net-snmp-5.4.1.old/agent/mibgroup/kernel_sunos5.c 2014-03-28 14:54:11.259600880 -0400 ++++ net-snmp-5.4.1/agent/mibgroup/kernel_sunos5.c 2014-03-28 14:52:32.837130820 -0400 +@@ -1908,8 +1908,10 @@ + * this is good + */ + havespeed = B_TRUE; ++ } else if ((getKstatInt("link", name, "ifspeed", &ifp->ifSpeed) == 0) || ++ (getKstatInt("link", name, "ifSpeed", &ifp->ifSpeed) == 0)) { ++ havespeed = B_TRUE; + } +- + /* make ifOperStatus depend on link status if available */ + if (ifp->ifAdminStatus == 1) { + int i_tmp; diff -r f0ad806e26ab -r 1940d0927363 components/net-snmp/patches/044.15805491.hr_filesys.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/net-snmp/patches/044.15805491.hr_filesys.patch Fri May 02 12:23:29 2014 +0200 @@ -0,0 +1,28 @@ +This patch taken from the net-snmp community fixes an issue related to mismatch of the +indices in the host resources tables for monitoring disk storage. + +The details for the upstream bug/patch are given below. +BUG: 1557372: Realign hrFSStorageIndex with hrStorageTable +http://net-snmp.svn.sourceforge.net/viewvc/net-snmp?view=revision&revision=17138 + +--- net-snmp-5.4.1.old/agent/mibgroup/host/hr_filesys.c 2014-03-25 07:06:17.172039070 -0400 ++++ net-snmp-5.4.1/agent/mibgroup/host/hr_filesys.c 2014-03-25 07:10:05.467869740 -0400 +@@ -4,6 +4,9 @@ + */ + + #include ++#include ++#include ++#include + #include "host_res.h" + #include "hr_filesys.h" + #include "hr_storage.h" +@@ -546,7 +549,7 @@ + long_return = 2; /* others probably aren't */ + return (u_char *) & long_return; + case HRFSYS_STOREIDX: +- long_return = fsys_idx + HRS_TYPE_FIXED_MAX; ++ long_return = fsys_idx + NETSNMP_MEM_TYPE_MAX; + return (u_char *) & long_return; + case HRFSYS_FULLDUMP: + return when_dumped(HRFS_entry->HRFS_name, FULL_DUMP, var_len);