#1932 "pass" doesn't handle SET requests properly

agent (1105)
Dave Shield

On the 5.2.x line, the "pass" extension
mechanism doesn't seem to handle SET
requests properly.
The command to invoke is constructed
successfully ("script -s OID type value")
but when script is actually called, it
doesn't see the value parameter.

This mechanism works correctly on the 5.3.x
line and above, which use different code
for invoking the extension script.

See the thread "passing parameters to a
perl script through snmpd" on the users list
(11/12 Feb)


  • Nobody/Anonymous

    Logged In: NO

    it's constructed in the code successfully but looses the final argument before the exec? really???

  • Dave Shield

    Dave Shield - 2008-02-13

    Logged In: YES
    Originator: YES


    If you run snmpd with the option -Dexec
    it will print the command that's being run:

    exec:get_exec_output: calling
    /root/script.pl . string hi

    This is basically just a text string.
    The get_exec_output code then tokenizes this string
    into an argv array, and forks off the subprocess.

    I suspect it's this tokenization which is failing.
    The 5.3.x line consolidated several similar chunks
    of code into one routine, which works correctly.
    But we intend to track down and fix the problem in
    the 5.2.x line before the next release.

  • Dave Shield

    Dave Shield - 2008-07-28

    Logged In: YES
    Originator: YES

    I don't recall what was done to fix this, but the latest 5.2.x code
    (i.e. 5.2.5) appears to work correctly


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks