Menu

#670 pass control has a strange behaviour

closed
nobody
apps (205)
5
2012-11-08
2003-02-20
Anonymous
No

Hi,

On net-snmp-5.0.6:
I add a directives in snmpd.conf
"pass .1.3.6.1.4.1.2021.255 /tmp/passtest"
(using net-snmp-5.0.7/local/passtest)

snmpget set .1.3.6.1.4.1.2021.255.1 string "new value"
--> /tmp/passtest -s .1.3.6.1.4.1.10357.1 string "another string"
$0 = /tmp/passtest
$1 = -s
$2 = .1.3.6.1.4.1.10357.1
$3 = string
$4 = "another string"
All works OK

BUT on net-snmp-5.0.7
snmpget set .1.3.6.1.4.1.2021.255.1 string "new value"
--> /tmp/passtest -s .1.3.6.1.4.1.10357.1string "another string"
In fact,
$0 = /tmp/passtest
$1 = -s
$2 = .1.3.6.1.4.1.10357.1string
$3 = "another
$4 = string"

Discussion

  • Eric E. Bowles

    Eric E. Bowles - 2003-05-21

    Logged In: YES
    user_id=783508

    There's a missing trailing space in the string used to
    invoke the external program in net-snmp 5.0.7. Here's a
    simple patch that I created against 5.0.8 that I think fixes
    the problem:

    --- agent/mibgroup/ucd-snmp/pass.c Wed Feb 12 01:13:19 2003
    +++ agent/mibgroup/ucd-snmp/pass.c.new Tue May 20 18:21:35 2003
    @@ -421,7 +421,7 @@
    else
    sprint_mib_oid(buf, name, name_len);
    snprintf(passthru->command,
    sizeof(passthru->command),
    - "%s -s %s", passthru->name, buf);
    + "%s -s %s ", passthru->name, buf);
    passthru->command[ sizeof(passthru->command)-1
    ] = 0;
    switch (var_val_type) {
    case ASN_INTEGER:

     
  • Dave Shield

    Dave Shield - 2003-05-21

    Logged In: YES
    user_id=88893

    Thanks for the bug report! We've fixed the problem for the next release of the net-snmp package.

     

Log in to post a comment.

MongoDB Logo MongoDB