]> git.pld-linux.org Git - packages/net-snmp.git/commitdiff
- rel 1; add two fixes from fc and updates lm sensors patch auto/th/net-snmp-5_5-1
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Sat, 5 Jun 2010 18:26:55 +0000 (18:26 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    net-snmp-5.5-missing-bcast.patch -> 1.1
    net-snmp-5.5-tcp-pid.patch -> 1.1
    net-snmp-defaultconfig.patch -> 1.2
    net-snmp-lm_sensors_3.patch -> 1.3
    net-snmp.spec -> 1.162

net-snmp-5.5-missing-bcast.patch [new file with mode: 0644]
net-snmp-5.5-tcp-pid.patch [new file with mode: 0644]
net-snmp-defaultconfig.patch
net-snmp-lm_sensors_3.patch
net-snmp.spec

diff --git a/net-snmp-5.5-missing-bcast.patch b/net-snmp-5.5-missing-bcast.patch
new file mode 100644 (file)
index 0000000..b05eb01
--- /dev/null
@@ -0,0 +1,27 @@
+544849 -  snmpd segfaults when openvpn is running
+
+Source: upstream, svn rev. 17931
+
+Clear the bcastentry in every loop iteration. If not cleared, the bcastentry
+might be insterted into the container twice, when processing an interface
+without broadcast address (like OpenVPN's tun0).
+
+diff -up net-snmp-5.5/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.c.new net-snmp-5.5/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.c
+--- net-snmp-5.5/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.c.new       2009-05-06 23:59:20.000000000 +0200
++++ net-snmp-5.5/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.c   2009-12-21 15:58:02.000000000 +0100
+@@ -135,7 +135,6 @@ _netsnmp_ioctl_ipaddress_container_load_
+     struct ifreq   *ifrp;
+     struct sockaddr save_addr;
+     struct sockaddr_in * si;
+-    netsnmp_ipaddress_entry *entry, *bcastentry = NULL;
+     struct address_flag_info addr_info;
+     in_addr_t       ipval;
+     _ioctl_extras           *extras;
+@@ -156,6 +155,7 @@ _netsnmp_ioctl_ipaddress_container_load_
+     ifrp = ifc.ifc_req;
+     for(i=0; i < interfaces; ++i, ++ifrp) {
++        netsnmp_ipaddress_entry *entry, *bcastentry = NULL;
+         DEBUGMSGTL(("access:ipaddress:container",
+                     " interface %d, %s\n", i, ifrp->ifr_name));
diff --git a/net-snmp-5.5-tcp-pid.patch b/net-snmp-5.5-tcp-pid.patch
new file mode 100644 (file)
index 0000000..3d67652
--- /dev/null
@@ -0,0 +1,60 @@
+551030 -  Memory corruption in TCP-MIB::tcpListenerProcess
+
+Source: upstream, SVN rev. 17861
+
+    CHANGES: snmpd: Fixed invalid access to memory in TCP-MIB
+
+diff --git a/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.c b/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.c
+index 7259bf8..e274d19 100644
+--- a/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.c
++++ b/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.c
+@@ -155,6 +155,8 @@ tcpConnectionTable_rowreq_ctx_cleanup(tcpConnectionTable_rowreq_ctx *
+     /*
+      * TODO:211:o: |-> Perform extra tcpConnectionTable rowreq cleanup.
+      */
++    netsnmp_access_tcpconn_entry_free(rowreq_ctx->data);
++    rowreq_ctx->data = NULL;
+ }                               /* tcpConnectionTable_rowreq_ctx_cleanup */
+ /**
+diff --git a/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_data_access.c b/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_data_access.c
+index 807dd9d..fec6bef 100644
+--- a/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_data_access.c
++++ b/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_data_access.c
+@@ -256,7 +256,8 @@ tcpConnectionTable_container_load(netsnmp_container *container)
+      * free the container. we've either claimed each entry, or released it,
+      * so the dal function doesn't need to clear the container.
+      */
+-    netsnmp_access_tcpconn_container_free(raw_data, 0);
++    netsnmp_access_tcpconn_container_free(raw_data,
++                                          NETSNMP_ACCESS_TCPCONN_FREE_DONT_CLEAR);
+     DEBUGMSGT(("verbose:tcpConnectionTable:tcpConnectionTable_cache_load",
+                "%d records\n", (int)CONTAINER_SIZE(container)));
+diff --git a/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable.c b/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable.c
+index f3009dd..ebd672b 100644
+--- a/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable.c
++++ b/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable.c
+@@ -154,6 +154,8 @@ tcpListenerTable_rowreq_ctx_cleanup(tcpListenerTable_rowreq_ctx *
+     /*
+      * TODO:211:o: |-> Perform extra tcpListenerTable rowreq cleanup.
+      */
++    netsnmp_access_tcpconn_entry_free(rowreq_ctx->data);
++    rowreq_ctx->data = NULL;
+ }                               /* tcpListenerTable_rowreq_ctx_cleanup */
+ /**
+diff --git a/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_data_access.c b/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_data_access.c
+index 09ba655..b25d5db 100644
+--- a/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_data_access.c
++++ b/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_data_access.c
+@@ -254,7 +254,8 @@ tcpListenerTable_container_load(netsnmp_container *container)
+      * free the container. we've either claimed each entry, or released it,
+      * so the dal function doesn't need to clear the container.
+      */
+-    netsnmp_access_tcpconn_container_free(raw_data, 0);
++    netsnmp_access_tcpconn_container_free(raw_data,
++                                          NETSNMP_ACCESS_TCPCONN_FREE_DONT_CLEAR);
+     DEBUGMSGT(("verbose:tcpListenerTable:tcpListenerTable_cache_load",
+                "%d records\n", (int)CONTAINER_SIZE(container)));
index e55d30a3fc42edb060e5c9cc712f5f987c9f2e2e..0c9bbcf66135fb29270173313bb120eb8d1a9317 100644 (file)
---- net-snmp-5.1.2.orig/EXAMPLE.conf.def
-+++ net-snmp-5.1.2/EXAMPLE.conf.def
-@@ -6,7 +6,7 @@
- ###############################################################################
+--- net-snmp-5.5/EXAMPLE.conf.def.org  2009-06-01 15:11:07.000000000 +0200
++++ net-snmp-5.5/EXAMPLE.conf.def      2010-06-05 20:02:19.658299931 +0200
+@@ -74,8 +74,8 @@
+ #  Note that setting these values here, results in the corresponding MIB objects being 'read-only'
+ #  See snmpd.conf(5) for more details
+-sysLocation    Sitting on the Dock of the Bay
+-sysContact     Me <me@example.org>
++sysLocation    Unknown (configure /etc/snmp/snmpd.local.conf)
++sysContact     Root <root@localhost> (configure /etc/snmp/snmpd.local.conf)
+                                                  # Application + End-to-End layers
+ sysServices    72
+@@ -84,11 +84,11 @@
+ #  Process Monitoring
  #
- # This file is intended to only be an example.  If, however, you want
--# to use it, it should be placed in SYSCONFDIR/snmp/snmpd.conf.
-+# to use it, it should be placed in /etc/snmp/snmpd.conf.
- # When the snmpd agent starts up, this is where it will look for it.
+                                # At least one  'mountd' process
+-proc  mountd
++#proc  mountd
+                                # No more than 4 'ntalkd' processes - 0 is OK
+-proc  ntalkd    4
++#proc  ntalkd    4
+                                # At least one 'sendmail' process, but no more than 10
+-proc  sendmail 10 1
++#proc  sendmail 10 1
+ #  Walk the UCD-SNMP-MIB::prTable to see the resulting output
+ #  Note that this table will be empty if there are no "proc" entries in the snmpd.conf file
+@@ -98,9 +98,9 @@
+ #  Disk Monitoring
  #
- # You might be interested in generating your own snmpd.conf file using
-@@ -58,31 +58,37 @@
- # from):
- #       sec.name  source          community
--com2sec local     localhost       COMMUNITY
--com2sec mynetwork NETWORK/24      COMMUNITY
-+com2sec paranoid  default         public
-+#com2sec readonly  default         public
-+#com2sec readwrite default         private
- ####
- # Second, map the security names into group names:
- #                     sec.model  sec.name
--group MyRWGroup       v1         local
--group MyRWGroup       v2c        local
--group MyRWGroup       usm        local
--group MyROGroup v1         mynetwork
--group MyROGroup v2c        mynetwork
--group MyROGroup usm        mynetwork
-+group MyROSystem v1        paranoid
-+group MyROSystem v2c       paranoid
-+group MyROSystem usm       paranoid
-+group MyROGroup v1         readonly
-+group MyROGroup v2c        readonly
-+group MyROGroup usm        readonly
-+group MyRWGroup v1         readwrite
-+group MyRWGroup v2c        readwrite
-+group MyRWGroup usm        readwrite
- ####
- # Third, create a view for us to let the groups have rights to:
- #           incl/excl subtree                          mask
- view all    included  .1                               80
-+view system included  .iso.org.dod.internet.mgmt.mib-2.system
- ####
- # Finally, grant the 2 groups access to the 1 view with different
- # write permissions:
- #                context sec.model sec.level match  read   write  notif
-+access MyROSystem ""     any       noauth    exact  system none   none
- access MyROGroup ""      any       noauth    exact  all    none   none
- access MyRWGroup ""      any       noauth    exact  all    all    none
-@@ -100,8 +106,8 @@
- # value of an object whose value is given here will fail with an error
- # status of notWritable.
--syslocation Right here, right now.
--syscontact Me <me@somewhere.org>
-+syslocation Unknown (configure /etc/snmp/snmpd.local.conf)
-+syscontact Root <root@localhost> (configure /etc/snmp/snmpd.local.conf)
- # Example output of snmpwalk:
- #   % snmpwalk -v 1 -c public localhost system
-@@ -135,13 +141,13 @@
+                                # 10MBs required on root disk, 5% free on /var, 10% free on all other disks
+-disk       /     10000
+-disk       /var  5%
+-includeAllDisks  10%
++#disk       /     10000
++#disk       /var  5%
++#includeAllDisks  10%
+ #  Walk the UCD-SNMP-MIB::dskTable to see the resulting output
+ #  Note that this table will be empty if there are no "disk" entries in the snmpd.conf file
+@@ -110,7 +110,7 @@
+ #  System Load
  #
+                                # Unacceptable 1-, 5-, and 15-minute load averages
+-load   12 10 5
++#load   12 10 5
  
- #  Make sure mountd is running
--proc mountd
-+#proc mountd
- #  Make sure there are no more than 4 ntalkds running, but 0 is ok too.
--proc ntalkd 4
-+#proc ntalkd 4
- #  Make sure at least one sendmail, but less than or equal to 10 are running.
--proc sendmail 10 1
-+#proc sendmail 10 1
- #  A snmpwalk of the prTable would look something like this:
- # 
-@@ -199,7 +205,7 @@
- #  ARGS:     optional arguments to be passed to the program
- # a simple hello world
--exec echotest /bin/echo hello world
-+#exec echotest /bin/echo hello world
- # Run a shell script containing:
+ #  Walk the UCD-SNMP-MIB::laTable to see the resulting output
+ #  Note that this table *will* be populated, even without a "load" entry in the snmpd.conf file
+@@ -154,8 +154,8 @@
  #
-@@ -250,7 +256,7 @@
- # Check the / partition and make sure it contains at least 10 megs.
--disk / 10000
-+#disk / 10000
- # % snmpwalk -v 1 -c public localhost .EXTENSIBLEDOTMIB.DISKMIBNUM
- # enterprises.ucdavis.diskTable.dskEntry.diskIndex.1 = 0
-@@ -279,7 +285,7 @@
- # 15MAX:  Similar, but for 15 min average.
- # Check for loads:
--load 12 14 14
-+#load 12 14 14
- # % snmpwalk -v 1 -c public localhost .EXTENSIBLEDOTMIB.LOADAVEMIBNUM
- # enterprises.ucdavis.loadTable.laEntry.loadaveIndex.1 = 1
-@@ -365,7 +371,7 @@
- #           (commented out here since it requires that you place the
- #           script in the right location. (its not installed by default))
--# pass .EXTENSIBLEDOTMIB.255 /bin/sh PREFIX/local/passtest
-+# pass .EXTENSIBLEDOTMIB.255 /bin/sh /usr/local/passtest
+ #  Arbitrary extension commands
+ #
+- extend    test1   /bin/echo  Hello, world!
+- extend-sh test2   echo Hello, world! ; echo Hi there ; exit 35
++#extend    test1   /bin/echo  Hello, world!
++#extend-sh test2   echo Hello, world! ; echo Hi there ; exit 35
+ #extend-sh test3   /bin/sh /tmp/shtest
  
- # % snmpwalk -v 1 -c public localhost .EXTENSIBLEDOTMIB.255
- # enterprises.ucdavis.255.1 = "life the universe and everything"
---- net-snmp-5.1.2.orig/EXAMPLE-trap.conf
-+++ net-snmp-5.1.2/EXAMPLE-trap.conf
-@@ -0,0 +1,18 @@
-+###############################################################################
-+#
-+# EXAMPLE-trap.conf:
-+#   An example configuration file for configuring the Net-SNMP snmptrapd agent.
-+#
-+###############################################################################
-+#
-+# This file is intended to only be an example.  If, however, you want
-+# to use it, it should be placed in /etc/snmp/snmptrapd.conf.
-+# When the snmptrapd agent starts up, this is where it will look for it.
-+#
-+# All lines beginning with a '#' are comments and are intended for you
-+# to read.  All other lines are configuration commands for the agent.
-+
-+#
-+# PLEASE: read the snmptrapd.conf(5) manual page as well!
-+#
-+
+ #  Note that this last entry requires the script '/tmp/shtest' to be created first,
index bfdbd190faccb1c3572a0d20d274b74213e7858d..db103819074753eb43cf15ccfdcba4841c449bb8 100644 (file)
-351991: Port net-snmp to lm_sensors-3.x.x
-Source: upstream, svn diff -r 16736:16739
-Reviewed-By: Jan Safranek <jsafrane@redhat.com>
+Compile with lm_sensors3.
 
-Index: include/net-snmp/agent/hardware/sensors.h
-===================================================================
---- include/net-snmp/agent/hardware/sensors.h  (revision 0)
-+++ include/net-snmp/agent/hardware/sensors.h  (revision 16739)
-@@ -0,0 +1,48 @@
-+/*
-+ * Hardware Abstraction Layer - Sensors module
-+ *
-+ * Public interface
-+ */
-+
-+#define NETSNMP_SENSOR_TYPE_OTHER       1
-+#define NETSNMP_SENSOR_TYPE_VOLTAGE_AC  3
-+#define NETSNMP_SENSOR_TYPE_VOLTAGE_DC  4
-+#define NETSNMP_SENSOR_TYPE_CURRENT     5
-+#define NETSNMP_SENSOR_TYPE_POWER       6
-+#define NETSNMP_SENSOR_TYPE_FREQUENCY   7
-+#define NETSNMP_SENSOR_TYPE_TEMPERATURE 8
-+#define NETSNMP_SENSOR_TYPE_HUMIDITY    9
-+#define NETSNMP_SENSOR_TYPE_RPM        10
-+#define NETSNMP_SENSOR_TYPE_VOLUME     11
-+#define NETSNMP_SENSOR_TYPE_BOOLEAN    12
-+
-+
-+#define NETSNMP_SENSOR_FLAG_ACTIVE     0x01
-+#define NETSNMP_SENSOR_FLAG_NAVAIL     0x02
-+#define NETSNMP_SENSOR_FLAG_BROKEN     0x04
-+#define NETSNMP_SENSOR_FLAG_DISABLE    0x08
-+
-+#define NETSNMP_SENSOR_MASK_STATUS     0x06  /* NAVAIL|BROKEN */
-+
-+
-+#define NETSNMP_SENSOR_FIND_CREATE     1   /* or use one of the sensor type values */
-+#define NETSNMP_SENSOR_FIND_EXIST      0
-+
-+typedef struct netsnmp_sensor_info_s netsnmp_sensor_info;
-+struct netsnmp_sensor_info_s {
-+
-+    netsnmp_index  idx;
-+    /* int  idx; */
-+    char  name[256];
-+    
-+    int   type;
-+    float value;
-+    char  descr[256];
-+    long  flags;
-+};
-+
-+netsnmp_container   *get_sensor_container( void );
-+netsnmp_cache       *get_sensor_cache( void );
-+netsnmp_sensor_info *sensor_by_name( char *, int );
-+NetsnmpCacheLoad     netsnmp_sensor_load;
-+NetsnmpCacheFree     netsnmp_sensor_free;
-Index: agent/mibgroup/ucd-snmp/lmsensorsMib.c
-===================================================================
---- agent/mibgroup/ucd-snmp/lmsensorsMib.c     (revision 0)
-+++ agent/mibgroup/ucd-snmp/lmsensorsMib.c     (revision 16739)
-@@ -0,0 +1,205 @@
-+#include <net-snmp/net-snmp-config.h>
-+#include <net-snmp/net-snmp-includes.h>
-+#include <net-snmp/agent/net-snmp-agent-includes.h>
-+#include <net-snmp/agent/hardware/sensors.h>
-+#include "ucd-snmp/lmsensorsMib.h"
-+
-+netsnmp_container *sensorContainer = NULL;
-+
-+void initialize_lmSensorsTable(const char *tableName, oid *tableOID,
-+                               netsnmp_container_op *filter, int mult );
-+
-+int _sensor_filter_temp( netsnmp_container *c, const void *v );
-+int _sensor_filter_fan(  netsnmp_container *c, const void *v );
-+int _sensor_filter_volt( netsnmp_container *c, const void *v );
-+int _sensor_filter_misc( netsnmp_container *c, const void *v );
-+
-+static oid lmTempSensorsTable_oid[]   = {1,3,6,1,4,1,2021,13,16,2};
-+static oid lmFanSensorsTable_oid[]    = {1,3,6,1,4,1,2021,13,16,3};
-+static oid lmVoltSensorsTable_oid[]   = {1,3,6,1,4,1,2021,13,16,4};
-+static oid lmMiscSensorsTable_oid[]   = {1,3,6,1,4,1,2021,13,16,5};
-+            /* All the tables have the same length root OID */
-+size_t     lmSensorsTables_oid_len = OID_LENGTH(lmMiscSensorsTable_oid);
-+
-+
-+/* Initialise the LM Sensors MIB module */
-+void
-+init_lmsensorsMib(void)
-+{
-+    DEBUGMSGTL(("ucd-snmp/lmsensorsMib","Initializing LM-SENSORS-MIB tables\n"));
-+
-+    /* 
-+     * Initialise the four LM-SENSORS-MIB tables
-+     *
-+     * They are almost identical, so we can use the same registration code.
-+     */
-+    initialize_lmSensorsTable( "lmTempSensorsTable", lmTempSensorsTable_oid,
-+                                _sensor_filter_temp, 1000 );  /* MIB asks for mC */
-+    initialize_lmSensorsTable( "lmFanSensorsTable",  lmFanSensorsTable_oid,
-+                                _sensor_filter_fan,  1);
-+    initialize_lmSensorsTable( "lmVoltSensorsTable", lmVoltSensorsTable_oid,
-+                                _sensor_filter_volt, 1000 );  /* MIB asks for mV */
-+    initialize_lmSensorsTable( "lmMiscSensorsTable", lmMiscSensorsTable_oid,
-+                                _sensor_filter_misc, 1 );
-+}
-+
-+/*
-+ * Common initialisation code, used for setting up all four tables
-+ */
-+void
-+initialize_lmSensorsTable(const char *tableName, oid *tableOID,
-+                          netsnmp_container_op *filter, int mult )
-+{
-+    netsnmp_handler_registration    *reg;
-+    netsnmp_table_registration_info *table_info;
-+    netsnmp_cache     *cache;
-+    netsnmp_container *container;
-+
-+    /*
-+     * Ensure the HAL sensors module has been initialised,
-+     *   and retrieve the main sensors container.
-+     * This table will then be registered using a filter on this container.
-+     */
-+    sensorContainer = get_sensor_container();
-+    if ( !sensorContainer ) {
-+        init_hw_sensors( );
-+        sensorContainer = get_sensor_container();
-+    }
-+    container = netsnmp_container_find("sensorTable:table_container");
-+    container->insert_filter = filter;
-+    netsnmp_container_add_index( sensorContainer, container );
-+
-+
-+    /*
-+     * Create a basic registration structure for the table
-+     */
-+    reg = netsnmp_create_handler_registration(
-+               tableName, lmSensorsTables_handler,
-+               tableOID,  lmSensorsTables_oid_len, HANDLER_CAN_RONLY
-+              );
-+
-+    /*
-+     * Register the table using the filtered container
-+     * Include an indicator of any scaling to be applied to the sensor value
-+     */
-+    reg->my_reg_void = (void *)mult;
-+    table_info = SNMP_MALLOC_TYPEDEF( netsnmp_table_registration_info );
-+    netsnmp_table_helper_add_indexes(table_info, ASN_INTEGER, 0);
-+    table_info->min_column = COLUMN_LMSENSORS_INDEX;
-+    table_info->max_column = COLUMN_LMSENSORS_VALUE;
-+    netsnmp_container_table_register( reg, table_info, container, 0 );
-+
-+    /*
-+     * If the HAL sensors module was configured as an on-demand caching
-+     *  module (rather than being automatically loaded regularly),
-+     *  then ensure this table makes use of that cache.
-+     */
-+    cache = get_sensor_cache();
-+    if ( cache ) {
-+        netsnmp_inject_handler_before( reg, netsnmp_cache_handler_get( cache ),
-+                                            "table_container");
-+    }
-+
-+}
-+
-+
-+/*
-+ *  Container filters for the four tables
-+ *
-+ *  Used to ensure that sensor entries appear in the appropriate table.
-+ */
-+int _sensor_filter_temp( netsnmp_container *c, const void *v ) {
-+    const netsnmp_sensor_info *sp = (const netsnmp_sensor_info *)v;
-+    /* Only matches temperature sensors */
-+    return (( sp->type == NETSNMP_SENSOR_TYPE_TEMPERATURE ) ? 0 : 1 );
-+}
-+
-+int _sensor_filter_fan( netsnmp_container *c, const void *v ) {
-+    const netsnmp_sensor_info *sp = (const netsnmp_sensor_info *)v;
-+    /* Only matches fan sensors */
-+    return (( sp->type == NETSNMP_SENSOR_TYPE_RPM ) ? 0 : 1 );
-+}
-+
-+int _sensor_filter_volt( netsnmp_container *c, const void *v ) {
-+    const netsnmp_sensor_info *sp = (const netsnmp_sensor_info *)v;
-+    /* Only matches voltage sensors (AC or DC) */
-+    return ((( sp->type == NETSNMP_SENSOR_TYPE_VOLTAGE_DC ) ||
-+             ( sp->type == NETSNMP_SENSOR_TYPE_VOLTAGE_AC )) ? 0 : 1 );
-+}
-+
-+int _sensor_filter_misc( netsnmp_container *c, const void *v ) {
-+    const netsnmp_sensor_info *sp = (const netsnmp_sensor_info *)v;
-+    /* Matches everything except temperature, fan or voltage sensors */
-+    return ((( sp->type == NETSNMP_SENSOR_TYPE_TEMPERATURE ) ||
-+             ( sp->type == NETSNMP_SENSOR_TYPE_RPM         ) ||
-+             ( sp->type == NETSNMP_SENSOR_TYPE_VOLTAGE_DC  ) ||
-+             ( sp->type == NETSNMP_SENSOR_TYPE_VOLTAGE_AC  )) ? 1 : 0 );
-+}
-+
-+
-+/*
-+ * Handle requests for any of the four lmXxxxSensorsTables 
-+ *
-+ * This is possible because all the table share the
-+ *  same structure and behaviour.
-+ */
-+int
-+lmSensorsTables_handler(
-+    netsnmp_mib_handler               *handler,
-+    netsnmp_handler_registration      *reginfo,
-+    netsnmp_agent_request_info        *reqinfo,
-+    netsnmp_request_info              *requests) {
-+
-+    netsnmp_request_info       *request;
-+    netsnmp_table_request_info *table_info;
-+    netsnmp_sensor_info        *sensor_info;
-+    int mult  = (int)reginfo->my_reg_void;
-+
-+    DEBUGMSGTL(( "ucd-snmp/lmsensorsMib","lmSensorsTables_handler - root: "));
-+    DEBUGMSGOID(("ucd-snmp/lmsensorsMib", reginfo->rootoid, reginfo->rootoid_len));
-+    DEBUGMSG((   "ucd-snmp/lmsensorsMib",", mode %d\n", reqinfo->mode ));
-+    /*
-+     * This is a read-only table, so we only need to handle GET requests.
-+     *    (The container helper converts GETNEXT->GET requests automatically).
-+     */
-+    switch (reqinfo->mode) {
-+    case MODE_GET:
-+        for (request=requests; request; request=request->next) {
-+            sensor_info = (netsnmp_sensor_info *)
-+                            netsnmp_container_table_extract_context(request);
-+            if ( !sensor_info ) {
-+                netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHINSTANCE);
-+                continue;
-+            }
-+    
-+            table_info   =  netsnmp_extract_table_info(request);
-+            switch (table_info->colnum) {
-+            case COLUMN_LMSENSORS_INDEX:
-+                snmp_set_var_typed_integer( request->requestvb, ASN_INTEGER,
-+                                            sensor_info->idx.oids[0]);
-+                break;
-+            case COLUMN_LMSENSORS_DEVICE:
-+                if ( sensor_info->descr[0] != '\0' ) {
-+                    snmp_set_var_typed_value( request->requestvb, ASN_OCTET_STR,
-+                                              sensor_info->descr, strlen(sensor_info->descr));
-+                } else {
-+                    snmp_set_var_typed_value( request->requestvb, ASN_OCTET_STR,
-+                                              sensor_info->name,  strlen(sensor_info->name));
-+                }
-+                break;
-+            case COLUMN_LMSENSORS_VALUE:
-+                /* Multiply the value by the appropriate scaling factor for this table */
-+                snmp_set_var_typed_integer( request->requestvb, ASN_GAUGE,
-+                                            (int)(mult*sensor_info->value));
-+                break;
-+            default:
-+                netsnmp_set_request_error(reqinfo, request,
-+                                          SNMP_NOSUCHOBJECT);
-+                break;
-+            }
-+        }
-+        break;
-+
-+    }
-+    return SNMP_ERR_NOERROR;
-+}
-Index: agent/mibgroup/ucd-snmp/lmsensorsMib.h
-===================================================================
---- agent/mibgroup/ucd-snmp/lmsensorsMib.h     (revision 0)
-+++ agent/mibgroup/ucd-snmp/lmsensorsMib.h     (revision 16739)
-@@ -0,0 +1,23 @@
-+#ifndef LM_SENSORS_MIB_H
-+#define LM_SENSORS_MIB_H
-+
-+config_require(hardware/sensors)
-+config_add_mib(LM-SENSORS-MIB)
-+
-+/* function declarations */
-+void init_lmsensorsMib(void);
-+
-+/*
-+ * Handler and Column definitions for lmXxxxSensorsTable
-+ *
-+ * Note that the same handler (and hence the same
-+ *  column identifiers) are used for all four tables.
-+ * This is possible because all the table share the
-+ *  same structure and behaviour.
-+ */
-+Netsnmp_Node_Handler lmSensorsTables_handler;
-+#define COLUMN_LMSENSORS_INDEX                1
-+#define COLUMN_LMSENSORS_DEVICE               2
-+#define COLUMN_LMSENSORS_VALUE                3
-+
-+#endif /* LM_SENSORS_MIB_H */
-Index: agent/mibgroup/hardware/sensors.h
-===================================================================
---- agent/mibgroup/hardware/sensors.h  (revision 0)
-+++ agent/mibgroup/hardware/sensors.h  (revision 16739)
-@@ -0,0 +1,13 @@
-+config_require(hardware/sensors/hw_sensors)
-+
-+#if defined(solaris)
-+# if defined(HAVE_PICL_H)
-+config_require(hardware/sensors/picld_sensors)
-+# else
-+config_require(hardware/sensors/kstat_sensors)
-+# endif
-+#else
+diff -up net-snmp-5.5/agent/mibgroup/hardware/sensors.h.orig net-snmp-5.5/agent/mibgroup/hardware/sensors.h
+--- net-snmp-5.5/agent/mibgroup/hardware/sensors.h.orig        2009-04-24 00:53:26.000000000 +0200
++++ net-snmp-5.5/agent/mibgroup/hardware/sensors.h     2009-09-29 12:00:18.000000000 +0200
+@@ -7,7 +7,7 @@ config_require(hardware/sensors/picld_se
+ config_require(hardware/sensors/kstat_sensors)
+ # endif
+ #else
+-config_require(hardware/sensors/lmsensors_v2)
 +config_require(hardware/sensors/lmsensors_v3)
-+#endif
-+
-+//config_require(hardware/sensors/dummy_sensors)
-Index: agent/mibgroup/hardware/sensors/hw_sensors.h
-===================================================================
---- agent/mibgroup/hardware/sensors/hw_sensors.h       (revision 0)
-+++ agent/mibgroup/hardware/sensors/hw_sensors.h       (revision 16739)
-@@ -0,0 +1 @@
-+void init_hw_sensors( void );
-Index: agent/mibgroup/hardware/sensors/lmsensors_v2.h
-===================================================================
---- agent/mibgroup/hardware/sensors/lmsensors_v2.h     (revision 0)
-+++ agent/mibgroup/hardware/sensors/lmsensors_v2.h     (revision 16739)
-@@ -0,0 +1 @@
-+config_require(hardware/sensors/hw_sensors)
-Index: agent/mibgroup/hardware/sensors/kstat_sensors.c
-===================================================================
---- agent/mibgroup/hardware/sensors/kstat_sensors.c    (revision 0)
-+++ agent/mibgroup/hardware/sensors/kstat_sensors.c    (revision 16739)
-@@ -0,0 +1,161 @@
-+#include <net-snmp/net-snmp-config.h>
-+#include <net-snmp/net-snmp-includes.h>
-+#include <net-snmp/agent/net-snmp-agent-includes.h>
-+#include <net-snmp/agent/hardware/sensors.h>
-+
-+#include "util_funcs.h"
-+#include <time.h>
-+
-+#include <kstat.h>
-+#include </usr/platform/sun4u/include/sys/envctrl.h>
-+
-+void netsnmp_sensor_arch_init( void ) {
-+    DEBUGMSGTL(("sensors:arch", "Initialise KStat Sensors module\n"));
-+}
-+
-+
-+int
-+netsnmp_sensor_arch_load(netsnmp_cache *cache, void *vp) {
-+    netsnmp_sensor_info        *sp;
-+
-+    int         i;
-+    const char *fantypes[]={"CPU","PWR","AFB"};
-+    char        name[ 256 ];
-+
-+    kstat_ctl_t    *kc;
-+    kstat_t        *kp;
-+    envctrl_fan_t  *fan_info;
-+    envctrl_ps_t   *power_info;
-+    envctrl_encl_t *enc_info;
-+
-+
-+    DEBUGMSGTL(("sensors:arch", "Reload KStat Sensors module\n"));
-+
-+    kc = kstat_open();
-+    if ( kc == 0) {
-+        DEBUGMSGTL(("sensors:arch", "Couldn't open kstat\n"));
-+        return 1;
-+    }
-+    
-+
-+    /*
-+     * Retrieve fan information
-+     */
-+    kp = kstat_lookup( kc, ENVCTRL_MODULE_NAME, 0, ENVCTRL_KSTAT_FANSTAT);
-+    if (( kp == 0 ) || (kstat_read( kc, kp, 0 ) == -1 )) {
-+        DEBUGMSGTL(("sensors:arch", "No fan information\n"));
-+    } else {
-+        fan_info = (envctrl_fan_t *)kp->ks_data;        
-+        for (i=0; i<kp->ks_ndata; i++) {
-+            memset( name, 0, 256 );
-+            snprintf( name, 255, "%s%d", fantypes[fan_info->type], fan_info->instance );
-+
-+            sp = sensor_by_name( name, NETSNMP_SENSOR_TYPE_RPM );
-+            if ( sp ) {
-+                sp->value = fan_info->fanspeed;
-+                sp->flags|= NETSNMP_SENSOR_FLAG_ACTIVE;
-+                snprintf( sp->descr, 255, "fan type %s number %d",
-+                          fantypes[fan_info->type], fan_info->instance );
-+            }
-+    
-+            fan_info++;
-+        }
-+    }
-+
-+
-+    /*
-+     * Retrieve Power Supply information
-+     */
-+    kp = kstat_lookup( kc, ENVCTRL_MODULE_NAME, 0, ENVCTRL_KSTAT_PSNAME);
-+    if (( kp == 0 ) || (kstat_read( kc, kp, 0 ) == -1 )) {
-+        DEBUGMSGTL(("sensors:arch", "No PSU information\n"));
-+    } else {
-+        power_info = (envctrl_ps_t *)kp->ks_data;        
-+        for (i=0; i<kp->ks_ndata; i++) {
-+            memset( name, 0, 256 );
-+            snprintf( name, 255, "PSU%d", power_info->instance );
-+
-+            sp = sensor_by_name( name, NETSNMP_SENSOR_TYPE_TEMPERATURE);
-+            if ( sp ) {
-+                sp->value = power_info->ps_tempr;
-+                sp->flags|= NETSNMP_SENSOR_FLAG_ACTIVE;
-+                snprintf( sp->descr, 255, "power supply %d", power_info->instance );
-+            }
-+    
-+            power_info++;
-+        }
-+    }
-+
-+
-+    /*
-+     * Retrieve Enclosure information
-+     */
-+    kp = kstat_lookup( kc, ENVCTRL_MODULE_NAME, 0, ENVCTRL_KSTAT_ENCL);
-+    if (( kp == 0 ) || (kstat_read( kc, kp, 0 ) == -1 )) {
-+        DEBUGMSGTL(("sensors:arch", "No enclosure information\n"));
-+    } else {
-+        enc_info = (envctrl_encl_t *)kp->ks_data;        
-+        for (i=0; i<kp->ks_ndata; i++) {
-+            /*
-+             * The enclosure information covers several different types of sensor
-+             */
-+            switch ( enc_info->type ) {
-+            case ENVCTRL_ENCL_FSP:
-+                DEBUGMSGTL(("sensors:arch:detail", "Enclosure Front Panel\n"));
-+                sp = sensor_by_name( "FSP", NETSNMP_SENSOR_TYPE_OTHER);
-+                if ( sp ) {
-+                    sp->value = enc_info->value;
-+                    sp->flags|= NETSNMP_SENSOR_FLAG_ACTIVE;
-+                }
-+                break;
-+                
-+            case ENVCTRL_ENCL_AMBTEMPR:
-+                DEBUGMSGTL(("sensors:arch:detail", "Enclosure Ambient Temperature\n"));
-+                sp = sensor_by_name( "Ambient", NETSNMP_SENSOR_TYPE_TEMPERATURE);
-+                if ( sp ) {
-+                    sp->value = enc_info->value;
-+                    sp->flags|= NETSNMP_SENSOR_FLAG_ACTIVE;
-+                }
-+                break;
-+
-+            case ENVCTRL_ENCL_CPUTEMPR:
-+                DEBUGMSGTL(("sensors:arch:detail", "Enclosure CPU Temperature\n"));
-+                memset( name, 0, 256 );
-+                snprintf( name, 255, "CPU%d", enc_info->instance );
-+                sp = sensor_by_name( name, NETSNMP_SENSOR_TYPE_TEMPERATURE);
-+                if ( sp ) {
-+                    sp->value = enc_info->value;
-+                    sp->flags|= NETSNMP_SENSOR_FLAG_ACTIVE;
-+                    snprintf( sp->descr, 255, "CPU%d temperature", enc_info->instance );
-+                }
-+                break;
-+
-+            case ENVCTRL_ENCL_BACKPLANE4:
-+                DEBUGMSGTL(("sensors:arch:detail", "Enclosure Backplane4\n"));
-+                sp = sensor_by_name( "Backplane4", NETSNMP_SENSOR_TYPE_OTHER);
-+                if ( sp ) {
-+                    sp->value = enc_info->value;
-+                    sp->flags|= NETSNMP_SENSOR_FLAG_ACTIVE;
-+                }
-+                break;
-+                
-+            case ENVCTRL_ENCL_BACKPLANE8:
-+                DEBUGMSGTL(("sensors:arch:detail", "Enclosure Backplane4\n"));
-+                sp = sensor_by_name( "Backplane4", NETSNMP_SENSOR_TYPE_OTHER);
-+                if ( sp ) {
-+                    sp->value = enc_info->value;
-+                    sp->flags|= NETSNMP_SENSOR_FLAG_ACTIVE;
-+                }
-+                break;
-+
-+            default:    
-+                DEBUGMSGTL(("sensors:arch:detail", "Unrecognised Enclosure entry (%d)n",
-+                                                    enc_info->type));
-+            }
-+
-+            enc_info++;
-+        }
-+    }
-+
-+    return 0;
-+}
-Index: agent/mibgroup/hardware/sensors/lmsensors_v3.h
-===================================================================
---- agent/mibgroup/hardware/sensors/lmsensors_v3.h     (revision 0)
-+++ agent/mibgroup/hardware/sensors/lmsensors_v3.h     (revision 16739)
-@@ -0,0 +1 @@
-+config_require(hardware/sensors/hw_sensors)
-Index: agent/mibgroup/hardware/sensors/dummy_sensors.c
-===================================================================
---- agent/mibgroup/hardware/sensors/dummy_sensors.c    (revision 0)
-+++ agent/mibgroup/hardware/sensors/dummy_sensors.c    (revision 16739)
-@@ -0,0 +1,60 @@
-+#include <net-snmp/net-snmp-config.h>
-+#include <net-snmp/net-snmp-includes.h>
-+#include <net-snmp/agent/net-snmp-agent-includes.h>
-+#include <net-snmp/agent/hardware/sensors.h>
-+
-+
-+void netsnmp_sensor_arch_init( void ) {
-+    /* Nothing to do */
-+    DEBUGMSGTL(("sensors:arch", "Initialise Dummy Sensors module\n"));
-+}
-+
-+int
-+netsnmp_sensor_arch_load(netsnmp_cache *cache, void *vp) {
-+    time_t now;
-+    struct tm                  *tm;
-+    netsnmp_sensor_info        *sp;
-+
-+    time(&now);
-+    tm = localtime(&now);
-+
-+    DEBUGMSGTL(("sensors:arch", "Reload Dummy Sensors module\n"));
-+
-+    /* First pseudo-sensor - slowly-rising temperature */
-+    sp = sensor_by_name( "minute", NETSNMP_SENSOR_TYPE_TEMPERATURE );
-+    sp->value = tm->tm_min;
-+    snprintf( sp->descr, 256, "Minute-based pseudo-sensor - slowly-rising temperature" );
-+    sp->flags|= NETSNMP_SENSOR_FLAG_ACTIVE;
-+
-+    /* Second pseudo-sensor - quickly-rising temperature */
-+    sp = sensor_by_name( "second", NETSNMP_SENSOR_TYPE_TEMPERATURE );
-+    sp->value = tm->tm_sec;
-+    snprintf( sp->descr, 256, "Second-based pseudo-sensor - quickly-rising temperature" );
-+    sp->flags|= NETSNMP_SENSOR_FLAG_ACTIVE;
-+
-+    /* Third pseudo-sensor - annual fan speed */
-+    sp = sensor_by_name( "year", NETSNMP_SENSOR_TYPE_RPM );
-+    sp->value = tm->tm_year + 1900;
-+    snprintf( sp->descr, 256, "RPM pseudo-sensor - annual fan speed" );
-+    sp->flags|= NETSNMP_SENSOR_FLAG_ACTIVE;
-+
-+    /* Fourth pseudo-sensor - daily voltage */
-+    sp = sensor_by_name( "day", NETSNMP_SENSOR_TYPE_VOLTAGE_DC );
-+    sp->value = tm->tm_mday-20;
-+    snprintf( sp->descr, 256, "Day-based pseudo-sensor - positive or negative voltage" );
-+    sp->flags|= NETSNMP_SENSOR_FLAG_ACTIVE;
-+
-+    /* Fifth pseudo-sensor - monthly voltage */
-+    sp = sensor_by_name( "month", NETSNMP_SENSOR_TYPE_VOLTAGE_DC );
-+    sp->value = tm->tm_mon;
-+    snprintf( sp->descr, 256, "Month-based pseudo-sensor - positive voltage" );
-+    sp->flags|= NETSNMP_SENSOR_FLAG_ACTIVE;
-+
-+    /* Sixth pseudo-sensor - annual daily something */
-+    sp = sensor_by_name( "yday", NETSNMP_SENSOR_TYPE_OTHER );
-+    sp->value = tm->tm_yday;
-+    snprintf( sp->descr, 256, "Day-based pseudo-sensor - annual something" );
-+    sp->flags|= NETSNMP_SENSOR_FLAG_ACTIVE;
-+
-+    return 0;
-+}
-Index: agent/mibgroup/hardware/sensors/kstat_sensors.h
-===================================================================
---- agent/mibgroup/hardware/sensors/kstat_sensors.h    (revision 0)
-+++ agent/mibgroup/hardware/sensors/kstat_sensors.h    (revision 16739)
-@@ -0,0 +1 @@
-+config_require(hardware/sensors/hw_sensors)
-Index: agent/mibgroup/hardware/sensors/picld_sensors.c
-===================================================================
---- agent/mibgroup/hardware/sensors/picld_sensors.c    (revision 0)
-+++ agent/mibgroup/hardware/sensors/picld_sensors.c    (revision 16739)
-@@ -0,0 +1,341 @@
-+#include <net-snmp/net-snmp-config.h>
-+#include <net-snmp/net-snmp-includes.h>
-+#include <net-snmp/agent/net-snmp-agent-includes.h>
-+#include <net-snmp/agent/hardware/sensors.h>
-+
-+#include "util_funcs.h"
-+#include <time.h>
-+
-+#include <picl.h>
-+#include </usr/platform/sun4u/include/sys/envctrl.h>
-+
-+void netsnmp_sensor_arch_init( void ) {
-+    DEBUGMSGTL(("sensors:arch", "Initialise PICLd Sensors module\n"));
-+    picl_initialize();
-+}
-+
-+
-+/*
-+ * Handle a numeric-valued sensor
-+ */
-+static int
-+read_num_sensor( picl_nodehdl_t childh, char *propval, float *value )
-+{
-+    picl_nodehdl_t  sensorh;
-+    picl_propinfo_t sensor_info;
-+    picl_errno_t    error_code;
-+
-+    union valu {
-+        char buf[PICL_PROPSIZE_MAX];
-+        uint32_t us4;
-+        uint16_t us2;
-+        int32_t is4;
-+        int16_t is2;
-+        float f;
-+    } val;
-+
-+    /*
-+     *  Retrieve the specified sensor information and value
-+     */
-+    error_code = picl_get_propinfo_by_name(childh, propval, &sensor_info, &sensorh);
-+    if ( error_code != PICL_SUCCESS ) {
-+        DEBUGMSGTL(("sensors:arch:detail", "sensor info lookup failed (%d)\n",
-+                                            error_code));
-+        return( error_code );
-+    }
-+
-+    error_code = picl_get_propval(sensorh, &val.buf, sensor_info.size);
-+    if ( error_code != PICL_SUCCESS ) {
-+        DEBUGMSGTL(("sensors:arch:detail", "sensor value lookup failed (%d)\n",
-+                                            error_code));
-+        return( error_code );
-+    }
-+
-+    /*
-+     *  Check the validity (type and size) of this value
-+     */
-+    if ( sensor_info.type == PICL_PTYPE_FLOAT ) {
-+        *value = val.f;
-+    } else if ( sensor_info.type == PICL_PTYPE_UNSIGNED_INT ) {
-+        /* 16-bit or 32-bit unsigned integers */
-+        if ( sensor_info.size == 2 ) {
-+            *value = val.us2;
-+        } else if ( sensor_info.size == 4 ) { 
-+            *value = val.us4;
-+        } else {
-+            DEBUGMSGTL(("sensors:arch:detail", "unsigned integer (%d bit)\n",
-+                                                sensor_info.size * 8));
-+            return PICL_FAILURE;
-+        }
-+    } else if ( sensor_info.type == PICL_PTYPE_INT ) {
-+        /* 16-bit or 32-bit signed integers */
-+        if ( sensor_info.size == 2 ) {
-+            *value = val.is2;
-+        } else if ( sensor_info.size == 4 ) { 
-+            *value = val.is4;
-+        } else {
-+            DEBUGMSGTL(("sensors:arch:detail", "signed integer (%d bit)\n",
-+                                                sensor_info.size * 8));
-+            return PICL_FAILURE;
-+        }
-+    } else {
-+        DEBUGMSGTL(("sensors:arch:detail", "unrecognised type (%d)\n",
-+                                            sensor_info.type));
-+        return PICL_FAILURE;
-+    }
-+
-+    return error_code;
-+}
-+
-+static int
-+process_num_sensor( picl_nodehdl_t childh, char *propname, char *propval, int typ )
-+{
-+    netsnmp_sensor_info        *sp;
-+    float                       value;
-+    picl_errno_t    error_code;
-+
-+    sp = sensor_by_name( propname, typ );
-+    if ( !sp ) {
-+         return -1;
-+    }
-+
-+    error_code = read_num_sensor( childh, propval, &value );
-+    if ( error_code == PICL_SUCCESS ) {
-+        sp->value = value;
-+        sp->flags|= NETSNMP_SENSOR_FLAG_ACTIVE;
-+    } else {
-+        DEBUGMSGTL(("sensors:arch:detail", "Failed to read %s sensor value (%d)\n",
-+                                            propname, error_code));
-+        return -1;
-+    }
-+    return 0;
-+}
-+
-+
-+
-+/*
-+ *    Handle an enumeration-valued sensor
-+ */
-+char *switch_settings[] = { "OFF","ON","NORMAL","LOCKED",
-+                            "UNKNOWN","DIAG","SECURE",
-+                            NULL };
-+char *led_settings[]    = { "OFF","ON","BLINK",
-+                            NULL };
-+char *i2c_settings[]    = { "OK",
-+                            NULL };
-+
-+static int
-+read_enum_sensor( picl_nodehdl_t childh, float *value, char **options )
-+{
-+    picl_nodehdl_t  sensorh;
-+    picl_propinfo_t sensor_info;
-+    picl_errno_t    error_code;
-+    char            state[PICL_PROPSIZE_MAX];
-+    int             i;
-+
-+    /*
-+     *  Retrieve the specified sensor information and value
-+     */
-+    error_code = picl_get_propinfo_by_name(childh, "State", &sensor_info, &sensorh);
-+    if ( error_code != PICL_SUCCESS ) {
-+        DEBUGMSGTL(("sensors:arch:detail", "sensor info lookup failed (%d)\n",
-+                                            error_code));
-+        return( error_code );
-+    }
-+
-+    error_code = picl_get_propval(sensorh, state, sensor_info.size);
-+    if ( error_code != PICL_SUCCESS ) {
-+        DEBUGMSGTL(("sensors:arch:detail", "sensor value lookup failed (%d)\n",
-+                                            error_code));
-+        return( error_code );
-+    }
-+
-+    /*
-+     * Try to find a matching entry in the list of options.
-+     * Note that some platforms may use upper or lower case
-+     *   versions of these enumeration values
-+     *  (so the checks are case insensitive)
-+     */
-+    *value = 99;    /* Dummy value */
-+    for ( i=0;  options[i] != NULL; i++ ) {
-+        if (strncasecmp(state, options[i], strlen(options[i])) == 0) {
-+            *value = i;
-+            return 0;
-+        }
-+    }
-+    
-+    DEBUGMSGTL(("sensors:arch:detail", "Enumeration state %s not matched\n",
-+                                        state));
-+    return 0;  /* Or an error ? */
-+}
-+
-+static int
-+process_enum_sensor( picl_nodehdl_t childh, char *propname, int typ, char **options )
-+{
-+    netsnmp_sensor_info        *sp;
-+    float                       value;
-+    picl_errno_t    error_code;
-+
-+    sp = sensor_by_name( propname, typ );
-+    if ( !sp ) {
-+         return -1;
-+    }
-+
-+    error_code = read_enum_sensor( childh, &value, options );
-+    if ( error_code == PICL_SUCCESS ) {
-+        sp->value = value;
-+        sp->flags|= NETSNMP_SENSOR_FLAG_ACTIVE;
-+    } else {
-+        DEBUGMSGTL(("sensors:arch:detail", "Failed to read %s sensor value (%d)\n",
-+                                            propname, error_code));
-+        return -1;
-+    }
-+    return 0;
-+}
-+static int
-+process_enum_sensor( picl_nodehdl_t childh, char *propname, int typ, char **options )
-+{
-+    return 0;
-+}
-+
-+
-+
-+/*
-+ *  Recursively walk through the tree of sensors
-+ */
-+static int
-+process_sensors( int level, picl_nodehdl_t nodeh ) {
-+    picl_nodehdl_t childh, nexth;
-+    char           propname[  PICL_PROPNAMELEN_MAX  ];
-+    char           propclass[ PICL_CLASSNAMELEN_MAX ];
-+    picl_errno_t   error_code;
-+
-+    level++;
-+    DEBUGMSGTL(("sensors:arch:detail", "process_sensors - level %d\n", level));
-+
-+    /* Look up the first child node at this level */
-+    error_code = pick_get_propval_by_name( nodeh, PICL_PROP_CHILD,
-+                                           &childh, sizeof(childh));
-+    if ( error_code != PICL_SUCCESS ) {
-+        DEBUGMSGTL(("sensors:arch:detail", "Failed to get first child node (%d)\n",
-+                                            error_code));
-+        return( error_code );
-+    }
-+
-+    /* Step through the child nodes, retrieving the name and class of each one */
-+    while ( error_code == PICL_SUCCESS ) {
-+        error_code = pick_get_propval_by_name( childh, PICL_PROP_NAME,
-+                                               propname, sizeof(propname)-1);
-+        if ( error_code != PICL_SUCCESS ) {
-+            /* The Node With No Name */
-+            DEBUGMSGTL(("sensors:arch:detail", "get property name failed (%d)\n",
-+                                                error_code));
-+            return( error_code );
-+        }
-+
-+        error_code = pick_get_propval_by_name( childh, PICL_PROP_CLASSNAME,
-+                                               propclass, sizeof(propclass)-1);
-+        if ( error_code != PICL_SUCCESS ) {
-+            /* The Classless Society */
-+            DEBUGMSGTL(("sensors:arch:detail", "get property class failed (%d)\n",
-+                                                error_code));
-+            return( error_code );
-+        }
-+
-+        DEBUGMSGTL(("sensors:arch:detail", "Name: %s, Class %s\n",
-+                                            propname, propclass ));
-+
-+
-+        /*
-+         *  Three classes represent further groups of sensors, etc.
-+         *  Call 'process_sensors' recursively to handle this next level
-+         */
-+        if (( strstr( propclass, "picl"    )) ||
-+            ( strstr( propclass, "frutree" )) ||
-+            ( strstr( propclass, "obp"     ))) {
-+            process_sensors( level, childh );
-+        }
-+        /*
-+         *  Otherwise retrieve the value appropriately based on the
-+         *     class of the sensor.
-+         *
-+         *  We need to specify the name of the PICL property to retrieve
-+         *     for this class of sensor, and the Net-SNMP sensor type.
-+         */
-+        else if ( strstr( propclass, "fan-tachometer" )) {
-+            process_num_sensor( childh, propname, "AtoDSensorValue",
-+                                                   NETSNMP_SENSOR_TYPE_RPM );
-+        } else if ( strstr( propclass, "fan" )) {
-+            process_num_sensor( childh, propname, "Speed",
-+                                                   NETSNMP_SENSOR_TYPE_RPM );
-+        } else if ( strstr( propclass, "temperature-sensor" )) {
-+            process_num_sensor( childh, propname, "Temperature",
-+                                                   NETSNMP_SENSOR_TYPE_TEMPERATURE );
-+        } else if ( strstr( propclass, "voltage-sensor" )) {
-+            process_num_sensor( childh, propname, "Voltage",
-+                                          /* ?? */ NETSNMP_SENSOR_TYPE_VOLTAGE_DC );
-+        } else if ( strstr( propclass, "digital-sensor" )) {
-+            process_num_sensor( childh, propname, "AtoDSensorValue",
-+                                          /* ?? */ NETSNMP_SENSOR_TYPE_VOLTAGE_DC );
-+            /*
-+             * Enumeration-valued sensors use a fixed PICL property ("State"),
-+             *   but take a list of the values appropriate for that sensor,
-+             *   as well as the Net-SNMP sensor type.
-+             */
-+        } else if ( strstr( propclass, "switch" )) {
-+            process_enum_sensor( childh, propname, NETSNMP_SENSOR_TYPE_OTHER,
-+                                                   switch_settings );
-+        } else if ( strstr( propclass, "led" )) {
-+            process_enum_sensor( childh, propname, NETSNMP_SENSOR_TYPE_OTHER,
-+                                                   led_settings );
-+        } else if ( strstr( propclass, "i2c" )) {
-+            process_enum_sensor( childh, propname, NETSNMP_SENSOR_TYPE_BOOLEAN, /* ?? */
-+                                                   i2c_settings );
-+        } else {
-+            /* Skip other classes of sensor */
-+            DEBUGMSGTL(("sensors:arch:detail", "Skipping class %s\n", propclass ));
-+        }
-+
-+        /*
-+         *  Move on to the next child node at the current level (if any)
-+         */
-+        error_code = pick_get_propval_by_name( childh, PICL_PROP_PEER,
-+                                               &nexth, sizeof(nexth));
-+        if ( error_code != PICL_SUCCESS ) {
-+            /* That's All Folks! */
-+            return (( error_code == PICL_PROPNOTFOUND )
-+                          ? PICL_SUCCESS : error_code );
-+        }
-+        childh = nexth;
-+    }
-+    
-+    return error_code;
-+}
-+
-+
-+int
-+netsnmp_sensor_arch_load(netsnmp_cache *cache, void *vp) {
-+    int               error_code;
-+    picl_nodehdl_t    rooth;
-+
-+    DEBUGMSGTL(("sensors:arch", "Reload PICLd Sensors module\n"));
-+
-+    error_code = picl_get_root(&rooth);
-+    if ( error_code != PICL_SUCCESS) {
-+        DEBUGMSGTL(("sensors:arch", "Couldn't get root node (error %d)\n", error_code));
-+        return 1;
-+    }
-+
-+    error_code = process_sensors(0, rooth);
-+    if ( error_code != 255 )
-+        if ( error_code != 7 )  /* ignore PICL_PROPNOTFOUND error */
-+            DEBUGMSGTL(("sensors:arch", "Internal PICLd problem (error %d)\n", error_code));
-+
-+    return 0;
-+}
-+
-+void netsnmp_sensor_arch_shutdown( void ) {
-+    DEBUGMSGTL(("sensors:arch", "Shutdown PicLD Sensors module\n"));
-+    picl_shutdown();
-+}
-+
-Index: agent/mibgroup/hardware/sensors/hw_sensors.c
-===================================================================
---- agent/mibgroup/hardware/sensors/hw_sensors.c       (revision 0)
-+++ agent/mibgroup/hardware/sensors/hw_sensors.c       (revision 16739)
-@@ -0,0 +1,183 @@
-+#include <net-snmp/net-snmp-config.h>
-+#include <net-snmp/net-snmp-includes.h>
-+#include <net-snmp/agent/net-snmp-agent-includes.h>
-+#include <net-snmp/agent/hardware/sensors.h>
-+
-+
-+extern NetsnmpCacheLoad netsnmp_sensor_arch_load;
-+extern void             netsnmp_sensor_arch_init( void );
-+static int  _sensor_load( void );
-+static void _sensor_free( void );
-+
-+static int _sensorAutoUpdate = 0;   /* 0 means on-demand caching */
-+static void _sensor_update_stats( unsigned int, void* );
-+
-+netsnmp_cache     *_sensor_cache     = NULL;
-+netsnmp_container *_sensor_container = NULL;
-+static int         _sensor_idx       = 0;
-+
-+void init_hw_sensors( void ) {
-+
-+    if ( _sensor_container )
-+        return;   /* Already initialised */
-+
-+    DEBUGMSGTL(("sensors", "Initialise Hardware Sensors module\n"));
-+
-+    /*
-+     * Define a container to hold the basic list of sensors
-+     * The four LM-SENSOR-MIB containers will be created in
-+     *  the relevant initialisation routine(s)
-+     */
-+    _sensor_container = netsnmp_container_find("sensorTable:table_container");
-+    if ( NULL == _sensor_container ) {
-+        snmp_log( LOG_ERR, "failed to create container for sensorTable");
-+        return;
-+    }
-+    netsnmp_sensor_arch_init( );
-+
-+    /*
-+     * If we're sampling the sensor information automatically,
-+     *   then arrange for this to be triggered regularly.
-+     *
-+     * If we're not sampling these values regularly,
-+     *   create a suitable cache handler instead.
-+     */
-+    if ( _sensorAutoUpdate ) {
-+        DEBUGMSGTL(("sensors", "Reloading Hardware Sensors automatically (%d)\n",
-+                               _sensorAutoUpdate));
-+        snmp_alarm_register( _sensorAutoUpdate, SA_REPEAT,
-+                             _sensor_update_stats, NULL );
-+    }
-+    else {
-+        _sensor_cache = netsnmp_cache_create( 5, netsnmp_sensor_load,
-+                                                 netsnmp_sensor_free, NULL, 0 );
-+        DEBUGMSGTL(("sensors", "Reloading Hardware Sensors on-demand (%p)\n",
-+                               _sensor_cache));
-+    }
-+}
-+
-+void shutdown_hw_sensors( void ) {
-+    _sensor_free();
-+}
-+
-+/*
-+ *  Return the main sensor container
-+ */
-+netsnmp_container *get_sensor_container( void ) { return _sensor_container; }
-+
-+/*
-+ *  Return the main sensor cache control structure (if defined)
-+ */
-+netsnmp_cache *get_sensor_cache( void ) { return _sensor_cache; }
-+
-+
-+/*
-+ * Wrapper routine for automatically updating sensor statistics
-+ */
-+void
-+_sensor_update_stats( unsigned int clientreg, void *data )
-+{
-+    _sensor_free();
-+    _sensor_load();
-+}
-+
-+/*
-+ * Wrapper routine for re-loading sensor statistics on demand
-+ */
-+int
-+netsnmp_sensor_load( netsnmp_cache *cache, void *data )
-+{
-+    return _sensor_load();
-+}
-+
-+/*
-+ * Wrapper routine for releasing expired sensor statistics
-+ */
-+void
-+netsnmp_sensor_free( netsnmp_cache *cache, void *data )
-+{
-+    _sensor_free();
-+}
-+
-+
-+/*
-+ * Architecture-independent processing of loading sensor statistics
-+ */
-+static int
-+_sensor_load( void )
-+{
-+    netsnmp_sensor_arch_load( NULL, NULL );
-+}
-+
-+/*
-+ * Architecture-independent release of sensor statistics
-+ */
-+static void
-+_sensor_free( void )
-+{
-+    netsnmp_sensor_info *sp;
-+
-+    for (sp = CONTAINER_FIRST( _sensor_container );
-+         sp;
-+         sp = CONTAINER_NEXT(  _sensor_container, sp )) {
-+
-+         sp->flags &= ~ NETSNMP_SENSOR_FLAG_ACTIVE;
-+    }
-+}
-+
-+
-+/*
-+ * Retrieve a sensor entry by name,
-+ *  or (optionally) insert a new one into the container
-+ */
-+netsnmp_sensor_info *
-+sensor_by_name( char *name, int create_type )
-+{
-+    netsnmp_sensor_info *sp;
-+
-+    DEBUGMSGTL(("sensors:name", "Get sensor entry (%s)\n", name));
-+
-+    /*
-+     *  Look through the list for a matching entry
-+     */
-+        /* .. or use a secondary index container ?? */
-+    for (sp = CONTAINER_FIRST( _sensor_container );
-+         sp;
-+         sp = CONTAINER_NEXT(  _sensor_container, sp )) {
-+
-+        if ( !strcmp( name, sp->name ))
-+            return sp;
-+    }
-+
-+    /*
-+     * Not found...
-+     */
-+    if ( create_type == NETSNMP_SENSOR_FIND_EXIST ) {
-+        DEBUGMSGTL(("sensors:name", "No such sensor entry\n"));
-+        return NULL;
-+    }
-+
-+    /*
-+     * ... so let's create a new one, using the type supplied
-+     */
-+    sp = SNMP_MALLOC_TYPEDEF( netsnmp_sensor_info );
-+    if ( sp ) {
-+        strcpy( sp->name, name );
-+        sp->type = create_type;
-+        /*
-+         * Set up the index value.
-+         *  
-+         * All this trouble, just for a simple integer.
-+         * Surely there must be a better way?
-+         */
-+        sp->idx.len  = 1;
-+        sp->idx.oids = SNMP_MALLOC_TYPEDEF( oid );
-+        sp->idx.oids[0] = ++_sensor_idx;
-+    }
-+
-+    DEBUGMSGTL(("sensors:name", "Create sensor entry (type = %d, index = %d\n",
-+                                 create_type, _sensor_idx));
-+    CONTAINER_INSERT( _sensor_container, sp );
-+    return sp;
-+}
-+
-Index: agent/mibgroup/hardware/sensors/dummy_sensors.h
-===================================================================
---- agent/mibgroup/hardware/sensors/dummy_sensors.h    (revision 0)
-+++ agent/mibgroup/hardware/sensors/dummy_sensors.h    (revision 16739)
-@@ -0,0 +1 @@
-+config_require(hardware/sensors/hw_sensors)
-Index: agent/mibgroup/hardware/sensors/lmsensors_v2.c
-===================================================================
---- agent/mibgroup/hardware/sensors/lmsensors_v2.c     (revision 0)
-+++ agent/mibgroup/hardware/sensors/lmsensors_v2.c     (revision 16739)
-@@ -0,0 +1,75 @@
-+#include <net-snmp/net-snmp-config.h>
-+#include <net-snmp/net-snmp-includes.h>
-+#include <net-snmp/agent/net-snmp-agent-includes.h>
-+#include <net-snmp/agent/hardware/sensors.h>
-+
-+#include "util_funcs.h"
-+#include <time.h>
-+#include <sensors/sensors.h>
-+
-+void netsnmp_sensor_arch_init( void ) {
-+    FILE *fp = fopen("/etc/sensors.conf", "r");
-+    DEBUGMSGTL(("sensors:arch", "Initialise LM Sensors module\n"));
-+    sensors_init( fp );
-+}
-+
-+int
-+netsnmp_sensor_arch_load(netsnmp_cache *cache, void *vp) {
-+    netsnmp_sensor_info        *sp;
-+    const sensors_chip_name    *chip;
-+    const sensors_feature_data *data;
-+    int             chip_nr = 0;
-+
-+    DEBUGMSGTL(("sensors:arch", "Reload LM Sensors module\n"));
-+    while ((chip = sensors_get_detected_chips(&chip_nr))) {
-+      int             a = 0;
-+      int             b = 0;
-+
-+        while ((data = sensors_get_all_features(*chip, &a, &b))) {
-+            DEBUGMSGTL(("sensors:arch:detail", "get_all_features (%d, %d)\n", a, b));
-+            char           *label = NULL;
-+            double          val;
-+            int             type = NETSNMP_SENSOR_TYPE_OTHER;
-+
-+            if ((data->mode & SENSORS_MODE_R) &&
-+                (data->mapping == SENSORS_NO_MAPPING) &&
-+                !sensors_get_label(*chip, data->number, &label) &&
-+                !sensors_get_feature(*chip, data->number, &val)) {
-+
-+                DEBUGMSGTL(("sensors:arch:detail", "%s = %f\n", label, val));
-+                /*
-+                 * Determine the type of sensor from the description.
-+                 *
-+                 * If the text being looked for below is not in the label of a
-+                 * given sensor (e.g., the temp1 sensor has been labeled 'CPU'
-+                 * rather than 'CPU temp') it will be categorised as OTHER.
-+                 */
-+                if (strstr(label, "V")) {
-+                    type = NETSNMP_SENSOR_TYPE_VOLTAGE_DC;
-+                }
-+                if (strstr(label, "fan") || strstr(label, "Fan")) {
-+                    type = NETSNMP_SENSOR_TYPE_RPM;
-+                }
-+                if (strstr(label, "temp") || strstr(label, "Temp")) {
-+                    type = NETSNMP_SENSOR_TYPE_TEMPERATURE;
-+                }
-+
-+                /*
-+                 * Use this type to create a new sensor entry
-+                 *  (inserting it in the appropriate sub-containers)
-+                 */
-+                sp = sensor_by_name( label, type );
-+                if ( sp ) {
-+                    sp->value = val;
-+                    sp->flags|= NETSNMP_SENSOR_FLAG_ACTIVE;
-+                }
-+            }
-+          if (label) {
-+              free(label);
-+              label = NULL;
-+          }
-+        } /* end while data */
-+    } /* end while chip */
-+
-+    return 0;
-+}
-Index: agent/mibgroup/hardware/sensors/picld_sensors.h
-===================================================================
---- agent/mibgroup/hardware/sensors/picld_sensors.h    (revision 0)
-+++ agent/mibgroup/hardware/sensors/picld_sensors.h    (revision 16739)
-@@ -0,0 +1 @@
-+config_require(hardware/sensors/hw_sensors)
-Index: agent/mibgroup/hardware/sensors/lmsensors_v3.c
-===================================================================
---- agent/mibgroup/hardware/sensors/lmsensors_v3.c     (revision 0)
-+++ agent/mibgroup/hardware/sensors/lmsensors_v3.c     (revision 16739)
-@@ -0,0 +1,101 @@
-+#include <net-snmp/net-snmp-config.h>
-+#include <net-snmp/net-snmp-includes.h>
-+#include <net-snmp/agent/net-snmp-agent-includes.h>
-+#include <net-snmp/agent/hardware/sensors.h>
-+
-+#include "util_funcs.h"
-+#include <time.h>
-+#include <sensors/sensors.h>
-+
-+
-+void netsnmp_sensor_arch_init( void ) {
-+    FILE *fp = fopen("/etc/sensors.conf", "r");
-+    DEBUGMSGTL(("sensors:arch", "Initialise v3 LM Sensors module\n"));
-+    sensors_init( fp );
-+}
-+
-+int
-+netsnmp_sensor_arch_load(netsnmp_cache *cache, void *vp) {
-+    netsnmp_sensor_info        *sp;
-+    const sensors_chip_name    *chip;
-+    const sensors_feature      *data;
-+    const sensors_subfeature   *data2;
-+    int             chip_nr = 0;
-+
-+    DEBUGMSGTL(("sensors:arch", "Reload v3 LM Sensors module\n"));
-+    while ((chip = sensors_get_detected_chips( NULL, &chip_nr))) {
-+      int             a = 0;
-+
-+        while ((data = sensors_get_features( chip, &a))) {
-+            DEBUGMSGTL(("sensors:arch:detail", "get_features (%s, %d)\n", data->name, data->number));
-+          int             b = 0;
-+ 
-+
-+            while ((data2 = sensors_get_all_subfeatures( chip, data, &b))) {
-+                char           *label = NULL;
-+                double          val;
-+                int             type = NETSNMP_SENSOR_TYPE_OTHER;
-+
-+                DEBUGMSGTL(("sensors:arch:detail", "  get_subfeatures (%s, %d)\n", data2->name, data2->number));
-+                /*
-+                 * Check the type of this subfeature,
-+                 *   concentrating on the main "input" measurements.
-+                 */
-+                switch ( data2->type ) {
-+                case SENSORS_SUBFEATURE_IN_INPUT:
-+                    type = NETSNMP_SENSOR_TYPE_VOLTAGE_DC;
-+                    break;
-+                case SENSORS_SUBFEATURE_FAN_INPUT:
-+                    type = NETSNMP_SENSOR_TYPE_RPM;
-+                    break;
-+                case SENSORS_SUBFEATURE_TEMP_INPUT:
-+                    type = NETSNMP_SENSOR_TYPE_TEMPERATURE;
-+                    break;
-+                case SENSORS_SUBFEATURE_VID:
-+                    type = NETSNMP_SENSOR_TYPE_VOLTAGE_DC;
-+                    break;
-+                default:
-+                    /* Skip everything other than these basic sensor features - ??? */
-+                    DEBUGMSGTL(("sensors:arch:detail", "  Skip type %x\n", data2->type));
-+                    continue;
-+                }
-+            
-+                /*
-+                 * Get the name and value of this subfeature
-+                 */
-+/*
-+                if (!(label = sensors_get_label(chip, data))) {
-+                    DEBUGMSGTL(("sensors:arch:detail", "  Can't get name (%s)\n", label));
-+                    continue;
-+                }
-+                if (sensors_get_value(chip, data2->number, &val) < 0) {
-+                    DEBUGMSGTL(("sensors:arch:detail", "  Can't get value (%f)\n", val));
-+                    continue;
-+                }
-+*/
-+                if (!(label = sensors_get_label(chip, data)) ||
-+                     (sensors_get_value(chip, data2->number, &val) < 0)) {
-+                    DEBUGMSGTL(("sensors:arch:detail", "  Can't get name/value (%s, %f)\n", label, val));
-+                    continue;
-+                }
-+                DEBUGMSGTL(("sensors:arch:detail", "%s = %f\n", label, val));
-+
-+                /*
-+                 * Use this type to create a new sensor entry
-+                 *  (inserting it in the appropriate sub-containers)
-+                 */
-+                sp = sensor_by_name( label, type );
-+                if ( sp ) {
-+                    sp->value = val;
-+                    sp->flags|= NETSNMP_SENSOR_FLAG_ACTIVE;
-+                }
-+              if (label) {
-+                  free(label);
-+                  label = NULL;
-+              }
-+            } /* end while data2 */
-+        } /* end while data */
-+    } /* end while chip */
-+
-+    return 0;
-+}
+ #endif
+ /* config_require(hardware/sensors/dummy_sensors) */
index 372c5c2f910b89d4ba2120c5eb828d5981c70741..e5519e5b5284727fdd59a9ec0f83721234523935 100644 (file)
@@ -18,6 +18,8 @@
 %undefine      with_lm_sensors
 %endif
 
+%define        so_version      20
+
 %include       /usr/lib/rpm/macros.perl
 Summary:       A collection of SNMP protocol tools
 Summary(es.UTF-8):     Agente SNMP de la UCD
@@ -27,7 +29,7 @@ Summary(ru.UTF-8):    Набор утилит для протокола SNMP от U
 Summary(uk.UTF-8):     Набір утиліт для протоколу SNMP від UC-Davis
 Name:          net-snmp
 Version:       5.5
-Release:       0.1
+Release:       1
 License:       BSD-like
 Group:         Networking/Daemons
 Source0:       http://dl.sourceforge.net/net-snmp/%{name}-%{version}.tar.gz
@@ -53,7 +55,9 @@ Patch9:               %{name}-python.patch
 Patch10:       %{name}-lvalue.patch
 Patch11:       %{name}-defaultconfig.patch
 Patch12:       %{name}-use-rpm-hrmib.patch
+Patch13:       net-snmp-5.5-missing-bcast.patch
 Patch14:       %{name}-lm_sensors_3.patch
+Patch15:       net-snmp-5.5-tcp-pid.patch
 Patch17:       %{name}-TCP_STATS_CACHE_TIMEOUT.patch
 Patch19:       %{name}-loadave-writable.patch
 URL:           http://www.net-snmp.org/
@@ -427,11 +431,11 @@ SNMP dla trzech wersji tego protokołu (SNMPv3, SNMPv2c, SNMPv1).
 %patch8 -p1
 %patch9 -p1
 %patch10 -p1
-# check me
 %patch11 -p1
 %patch12 -p1
-# check me
-%patch14 -p0
+%patch13 -p1
+%patch14 -p1
+%patch15 -p1
 %patch17 -p1
 %patch19 -p1
 
@@ -607,10 +611,12 @@ fi
 %attr(640,root,root) %config(missingok,noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmpd.local.conf
 
 %attr(755,root,root) %{_sbindir}/snmpd
+%attr(755,root,root) %{_bindir}/net-snmp-create-v3-user
 
 %dir %{_libdir}/snmp
 %dir %{_libdir}/snmp/dlmod
 
+%{_mandir}/man1/net-snmp-create-v3-user.1*
 %{_mandir}/man5/snmpd.conf.5*
 %{_mandir}/man5/snmpd.examples.5*
 %{_mandir}/man5/snmpd.internal.5*
@@ -630,11 +636,11 @@ fi
 %attr(755,root,root) %{_libdir}/libnetsnmphelpers.so.*.*
 %attr(755,root,root) %{_libdir}/libnetsnmpmibs.so.*.*
 %attr(755,root,root) %{_libdir}/libnetsnmptrapd.so.*.*
-%attr(755,root,root) %ghost %{_libdir}/libnetsnmp.so.15
-%attr(755,root,root) %ghost %{_libdir}/libnetsnmpagent.so.15
-%attr(755,root,root) %ghost %{_libdir}/libnetsnmphelpers.so.15
-%attr(755,root,root) %ghost %{_libdir}/libnetsnmpmibs.so.15
-%attr(755,root,root) %ghost %{_libdir}/libnetsnmptrapd.so.15
+%attr(755,root,root) %ghost %{_libdir}/libnetsnmp.so.%{so_version}
+%attr(755,root,root) %ghost %{_libdir}/libnetsnmpagent.so.%{so_version}
+%attr(755,root,root) %ghost %{_libdir}/libnetsnmphelpers.so.%{so_version}
+%attr(755,root,root) %ghost %{_libdir}/libnetsnmpmibs.so.%{so_version}
+%attr(755,root,root) %ghost %{_libdir}/libnetsnmptrapd.so.%{so_version}
 
 %files devel
 %defattr(644,root,root,755)
This page took 0.112667 seconds and 4 git commands to generate.