components/net-snmp/patches/037.17651108.extend.patch
branchs11u1-sru
changeset 3007 eced0b6e2f82
equal deleted inserted replaced
3003:3909fd766280 3007:eced0b6e2f82
       
     1 This patch fixes the issue of the net-snmp agent
       
     2 crashing when duplicate entries are added for "exec"
       
     3 entries in snmpd.conf.
       
     4 The bug/patch details are given below.
       
     5 snmpd: PATCH: 1744157: Report duplicate "extend/exec" identifiers.
       
     6 http://sourceforge.net/p/net-snmp/patches/825/
       
     7 
       
     8 --- net-snmp-5.4.1.old/agent/mibgroup/agent/extend.c	2007-07-06 08:32:59.000000000 -0700
       
     9 +++ net-snmp-5.4.1/agent/mibgroup/agent/extend.c	2013-12-05 03:09:26.546468801 -0800
       
    10 @@ -450,6 +450,9 @@
       
    11          extension->command  = strdup( exec_command );
       
    12          if (cptr)
       
    13              extension->args = strdup( cptr );
       
    14 +        } else {
       
    15 +           snmp_log(LOG_ERR, "Duplicate MIBOID '%s' detected in exec statement, only the first one will be used.\n", exec_name);
       
    16 +           return;
       
    17      }
       
    18  
       
    19  #ifndef USING_UCD_SNMP_EXTENSIBLE_MODULE