Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 280549 - missing patch for Nagios-Plugin-1.4.13-r4, it concerns check_snmp command with " char
Summary: missing patch for Nagios-Plugin-1.4.13-r4, it concerns check_snmp command wit...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-06 11:38 UTC by Lukasz Bytnar
Modified: 2012-08-19 00:56 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukasz Bytnar 2009-08-06 11:38:21 UTC
snmpget allows to qury for oid."string" and check_snmp causes the error 

Could not open pipe: /usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 [authpriv] xxx.xxx.xxx.xxx:161  NET-SNMP-EXTEND-MIB::nsExtendOutput1Line."string"

it's really trivial patch and would be nice if it is fixed in next stable version 

here's the simple patch
--- nagios-plugins-1.4.11/plugins/popen.c.orig  2009-01-06 12:55:56.109268085 -0500
+++ nagios-plugins-1.4.11/plugins/popen.c   2009-01-06 12:56:10.569486214 -0500
@@ -133,8 +133,8 @@ spopen (const char *cmdstring)
    strcpy (cmd, cmdstring);
 
    /* This is not a shell, so we don't handle "???" */
-   if (strstr (cmdstring, "\""))
-       return NULL;
+   /* if (strstr (cmdstring, "\""))
+       return NULL; */
 
    /* allow single quotes, but only if non-whitesapce doesn't occur on both sides */
    if (strstr (cmdstring, " ' ") || strstr (cmdstring, "'''"))


Thx. Lucas

Reproducible: Always

Steps to Reproduce:
1.emerge any Nagios-plugin version
2.query snmp with "string" in command line
3.

Actual Results:  
Could not open pipe: /usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 [authpriv] xxx.xxx.xxx.xxx:161  NET-SNMP-EXTEND-MIB::nsExtendOutput1Line."string"

Expected Results:  
SNMP OK - OK |
Comment 1 Wormo (RETIRED) gentoo-dev 2009-08-08 06:39:05 UTC
Thanks for posting your solution -- assigning to nagios-plugins maintainers
Comment 2 Tobias Scherbaum (RETIRED) gentoo-dev 2009-09-18 12:54:47 UTC
This has been reported upstream?
Comment 3 Lukasz Bytnar 2009-09-18 16:12:51 UTC
(In reply to comment #2)
> This has been reported upstream?
> 
What do you mean?

Lucas

Comment 4 Tobias Scherbaum (RETIRED) gentoo-dev 2009-12-31 10:21:53 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > This has been reported upstream?
> > 
> What do you mean?

Are the upstream developers aware of this issue?
Comment 5 Diego Elio Pettenò (RETIRED) gentoo-dev 2012-08-19 00:56:57 UTC
This patch looks like a hack, please report upstream.