summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fd59a57)
raw | patch | inline | side by side (parent: fd59a57)
author | Subhendu Ghosh <sghosh@users.sourceforge.net> | |
Mon, 11 Nov 2002 22:15:55 +0000 (22:15 +0000) | ||
committer | Subhendu Ghosh <sghosh@users.sourceforge.net> | |
Mon, 11 Nov 2002 22:15:55 +0000 (22:15 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@187 f882894a-f735-0410-b71e-b25c423dba1c
plugins/check_snmp.c | patch | blob | history |
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
index 80366b81b43f9f3df3a572192854162490cf3151..a8ee06fd432848f07a07817f2fa8056e27c155d7 100644 (file)
--- a/plugins/check_snmp.c
+++ b/plugins/check_snmp.c
[-C community] [-s string] [-r regex] [-R regexi] [-t timeout]\n\
[-l label] [-u units] [-p port-number] [-d delimiter]\n\
[-D output-delimiter] [-m miblist] [-P snmp version]\n\
- [-L seclevel] [-U secname] [-a authproto] [-A authpasswd]\n\
- [-X privpasswd]\n"
+ [-L seclevel] [-U secname] [-a authproto] [-A authpasswd]\n\
+ [-X privpasswd]\n"
#define LONGOPTIONS "\
-H, --hostname=HOST\n\
asprintf(&proto, "%s", "3");
if ( (strcmp(seclevel, "noAuthNoPriv") == 0) || seclevel == NULL ) {
- authpriv = ssprintf(authpriv, "%s", "-l noAuthNoPriv" );
+ asprintf(&authpriv, "%s", "-l noAuthNoPriv" );
}
else if ( strcmp(seclevel, "authNoPriv") == 0 ) {
if ( secname == NULL || authpasswd == NULL) {
print_usage ();
exit (STATE_UNKNOWN);
}
- authpriv = ssprintf(authpriv, "-l authNoPriv -a %s -u %s -A %s ", authproto, secname, authpasswd);
+ asprintf(&authpriv, "-l authNoPriv -a %s -u %s -A %s ", authproto, secname, authpasswd);
}
else if ( strcmp(seclevel, "authPriv") == 0 ) {
if ( secname == NULL || authpasswd == NULL || privpasswd == NULL ) {
print_usage ();
exit (STATE_UNKNOWN);
}
- authpriv = ssprintf(authpriv, "-l authPriv -a %s -u %s -A %s -x DES -X %s ", authproto, secname, authpasswd, privpasswd);
+ asprintf(&authpriv, "-l authPriv -a %s -u %s -A %s -x DES -X %s ", authproto, secname, authpasswd, privpasswd);
}