summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorThomas Guyot-Sionnest <dermoth@aei.ca>2009-08-01 03:35:50 (GMT)
committerThomas Guyot-Sionnest <dermoth@aei.ca>2009-08-01 03:35:50 (GMT)
commit1295c936519d5e84e94d2751fca5941a8fb8a850 (patch)
tree5086b48f89d1f5aa15a9c2463dc44a16b571976d /plugins
parent43571dba915621251378e35e85cc593803d9fbe6 (diff)
downloadmonitoring-plugins-1295c936519d5e84e94d2751fca5941a8fb8a850.tar.gz
Fix check_snmp passing single-quotes as -m argument when it should be empty
Diffstat (limited to 'plugins')
-rw-r--r--plugins/check_snmp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
index 9096cda..bb3d295 100644
--- a/plugins/check_snmp.c
+++ b/plugins/check_snmp.c
@@ -207,7 +207,7 @@ main (int argc, char **argv)
207 207
208 /* This is just for display purposes, so it can remain a string */ 208 /* This is just for display purposes, so it can remain a string */
209 asprintf(&cl_hidden_auth, "%s -t %d -r %d -m %s -v %s %s %s:%s", 209 asprintf(&cl_hidden_auth, "%s -t %d -r %d -m %s -v %s %s %s:%s",
210 snmpcmd, timeout_interval, retries, miblist, proto, "[authpriv]", 210 snmpcmd, timeout_interval, retries, strlen(miblist) ? miblist : "''", proto, "[authpriv]",
211 server_address, port); 211 server_address, port);
212 212
213 for (i = 0; i < numoids; i++) { 213 for (i = 0; i < numoids; i++) {
@@ -256,7 +256,7 @@ main (int argc, char **argv)
256 oidname = strpcpy (oidname, ptr, delimiter); 256 oidname = strpcpy (oidname, ptr, delimiter);
257 response = strstr (ptr, delimiter); 257 response = strstr (ptr, delimiter);
258 if (verbose > 2) { 258 if (verbose > 2) {
259 printf("Processing line %i\n line: %s\n oidname: %s\n response: %s\n", i+1, ptr, oidname, response); 259 printf("Processing line %i\n oidname: %s\n response: %s\n", i+1, oidname, response);
260 } 260 }
261 261
262 /* We strip out the datatype indicator for PHBs */ 262 /* We strip out the datatype indicator for PHBs */
@@ -647,7 +647,7 @@ validate_arguments ()
647 if ( needmibs == TRUE ) { 647 if ( needmibs == TRUE ) {
648 miblist = strdup (DEFAULT_MIBLIST); 648 miblist = strdup (DEFAULT_MIBLIST);
649 }else{ 649 }else{
650 miblist = "''"; /* don't read any mib files for numeric oids */ 650 miblist = ""; /* don't read any mib files for numeric oids */
651 } 651 }
652 } 652 }
653 653