summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a8eac11)
raw | patch | inline | side by side (parent: a8eac11)
author | Holger Weiss <hweiss@users.sourceforge.net> | |
Wed, 24 Oct 2007 15:08:34 +0000 (15:08 +0000) | ||
committer | Holger Weiss <hweiss@users.sourceforge.net> | |
Wed, 24 Oct 2007 15:08:34 +0000 (15:08 +0000) |
(Bernhard Fischer on nagiosplug-devel@)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1809 f882894a-f735-0410-b71e-b25c423dba1c
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1809 f882894a-f735-0410-b71e-b25c423dba1c
THANKS.in | patch | blob | history | |
plugins/check_snmp.c | patch | blob | history |
diff --git a/THANKS.in b/THANKS.in
index cef2a77aec9fdac32828bc3b5804bb715e3f6ffc..8026a6deddca39480c7a07bca3986bdd193d7471 100644 (file)
--- a/THANKS.in
+++ b/THANKS.in
Andrew Elwell
Heiti Ernits
Sebastien Guay
-MAtteo HCE Valsasna
+Matteo HCE Valsasna
+Bernhard Fischer
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
index fd3028cf03aaf939a7c13b90f557e18030a0e8b1..845c1bb4b835bf43e23e08c72195a95c5bfb0eb2 100644 (file)
--- a/plugins/check_snmp.c
+++ b/plugins/check_snmp.c
int result = STATE_DEPENDENT;
char input_buffer[MAX_INPUT_BUFFER];
char *command_line = NULL;
+ char *cl_hidden_auth = NULL;
char *response = NULL;
char *outbuff;
char *output;
asprintf(&command_line, "%s -t %d -r %d -m %s -v %s %s %s:%s %s",
PATH_TO_SNMPGETNEXT, timeout_interval, retries, miblist, proto,
authpriv, server_address, port, oid);
+ asprintf(&cl_hidden_auth, "%s -t %d -r %d -m %s -v %s %s %s:%s %s",
+ PATH_TO_SNMPGETNEXT, timeout_interval, retries, miblist, proto,
+ "[authpriv]", server_address, port, oid);
}else{
asprintf (&command_line, "%s -t %d -r %d -m %s -v %s %s %s:%s %s",
PATH_TO_SNMPGET, timeout_interval, retries, miblist, proto,
authpriv, server_address, port, oid);
+ asprintf(&cl_hidden_auth, "%s -t %d -r %d -m %s -v %s %s %s:%s %s",
+ PATH_TO_SNMPGET, timeout_interval, retries, miblist, proto,
+ "[authpriv]", server_address, port, oid);
}
if (verbose)
/* run the command */
child_process = spopen (command_line);
if (child_process == NULL) {
- printf (_("Could not open pipe: %s\n"), command_line);
+ printf (_("Could not open pipe: %s\n"), cl_hidden_auth);
exit (STATE_UNKNOWN);
}
#if 0 /* Removed May 29, 2007 */
child_stderr = fdopen (child_stderr_array[fileno (child_process)], "r");
if (child_stderr == NULL) {
- printf (_("Could not open stderr for %s\n"), command_line);
+ printf (_("Could not open stderr for %s\n"), cl_hidden_auth);
}
#endif
die (STATE_UNKNOWN,
_("%s problem - No data received from host\nCMD: %s\n"),
label,
- command_line);
+ cl_hidden_auth);
#if 0 /* Removed May 29, 2007 */
/* WARNING if output found on stderr */