diff options
Diffstat (limited to 'plugins/t')
0 files changed, 0 insertions, 0 deletions
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c index 7c5d0ec..b79c020 100644 --- a/plugins/check_snmp.c +++ b/plugins/check_snmp.c | |||
@@ -277,32 +277,33 @@ main (int argc, char **argv) | |||
277 | /* 9 arguments to pass before authpriv options + 1 for host and numoids. Add one for terminating NULL */ | 277 | /* 9 arguments to pass before authpriv options + 1 for host and numoids. Add one for terminating NULL */ |
278 | command_line = calloc (9 + numauthpriv + 1 + numoids + 1, sizeof (char *)); | 278 | command_line = calloc (9 + numauthpriv + 1 + numoids + 1, sizeof (char *)); |
279 | command_line[0] = snmpcmd; | 279 | command_line[0] = snmpcmd; |
280 | command_line[1] = strdup ("-t"); | 280 | command_line[1] = strdup ("-Le"); |
281 | xasprintf (&command_line[2], "%d", timeout_interval); | 281 | command_line[2] = strdup ("-t"); |
282 | command_line[3] = strdup ("-r"); | 282 | xasprintf (&command_line[3], "%d", timeout_interval); |
283 | xasprintf (&command_line[4], "%d", retries); | 283 | command_line[4] = strdup ("-r"); |
284 | command_line[5] = strdup ("-m"); | 284 | xasprintf (&command_line[5], "%d", retries); |
285 | command_line[6] = strdup (miblist); | 285 | command_line[6] = strdup ("-m"); |
286 | command_line[7] = "-v"; | 286 | command_line[7] = strdup (miblist); |
287 | command_line[8] = strdup (proto); | 287 | command_line[8] = "-v"; |
288 | command_line[9] = strdup (proto); | ||
288 | 289 | ||
289 | for (i = 0; i < numauthpriv; i++) { | 290 | for (i = 0; i < numauthpriv; i++) { |
290 | command_line[9 + i] = authpriv[i]; | 291 | command_line[10 + i] = authpriv[i]; |
291 | } | 292 | } |
292 | 293 | ||
293 | xasprintf (&command_line[9 + numauthpriv], "%s:%s", server_address, port); | 294 | xasprintf (&command_line[10 + numauthpriv], "%s:%s", server_address, port); |
294 | 295 | ||
295 | /* This is just for display purposes, so it can remain a string */ | 296 | /* This is just for display purposes, so it can remain a string */ |
296 | xasprintf(&cl_hidden_auth, "%s -t %d -r %d -m %s -v %s %s %s:%s", | 297 | xasprintf(&cl_hidden_auth, "%s -Le -t %d -r %d -m %s -v %s %s %s:%s", |
297 | snmpcmd, timeout_interval, retries, strlen(miblist) ? miblist : "''", proto, "[authpriv]", | 298 | snmpcmd, timeout_interval, retries, strlen(miblist) ? miblist : "''", proto, "[authpriv]", |
298 | server_address, port); | 299 | server_address, port); |
299 | 300 | ||
300 | for (i = 0; i < numoids; i++) { | 301 | for (i = 0; i < numoids; i++) { |
301 | command_line[9 + numauthpriv + 1 + i] = oids[i]; | 302 | command_line[10 + numauthpriv + 1 + i] = oids[i]; |
302 | xasprintf(&cl_hidden_auth, "%s %s", cl_hidden_auth, oids[i]); | 303 | xasprintf(&cl_hidden_auth, "%s %s", cl_hidden_auth, oids[i]); |
303 | } | 304 | } |
304 | 305 | ||
305 | command_line[9 + numauthpriv + 1 + numoids] = NULL; | 306 | command_line[10 + numauthpriv + 1 + numoids] = NULL; |
306 | 307 | ||
307 | if (verbose) | 308 | if (verbose) |
308 | printf ("%s\n", cl_hidden_auth); | 309 | printf ("%s\n", cl_hidden_auth); |