summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/check_snmp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
index 80366b8..a8ee06f 100644
--- a/plugins/check_snmp.c
+++ b/plugins/check_snmp.c
@@ -35,8 +35,8 @@
35 [-C community] [-s string] [-r regex] [-R regexi] [-t timeout]\n\ 35 [-C community] [-s string] [-r regex] [-R regexi] [-t timeout]\n\
36 [-l label] [-u units] [-p port-number] [-d delimiter]\n\ 36 [-l label] [-u units] [-p port-number] [-d delimiter]\n\
37 [-D output-delimiter] [-m miblist] [-P snmp version]\n\ 37 [-D output-delimiter] [-m miblist] [-P snmp version]\n\
38 [-L seclevel] [-U secname] [-a authproto] [-A authpasswd]\n\ 38 [-L seclevel] [-U secname] [-a authproto] [-A authpasswd]\n\
39 [-X privpasswd]\n" 39 [-X privpasswd]\n"
40 40
41#define LONGOPTIONS "\ 41#define LONGOPTIONS "\
42 -H, --hostname=HOST\n\ 42 -H, --hostname=HOST\n\
@@ -726,7 +726,7 @@ validate_arguments ()
726 asprintf(&proto, "%s", "3"); 726 asprintf(&proto, "%s", "3");
727 727
728 if ( (strcmp(seclevel, "noAuthNoPriv") == 0) || seclevel == NULL ) { 728 if ( (strcmp(seclevel, "noAuthNoPriv") == 0) || seclevel == NULL ) {
729 authpriv = ssprintf(authpriv, "%s", "-l noAuthNoPriv" ); 729 asprintf(&authpriv, "%s", "-l noAuthNoPriv" );
730 } 730 }
731 else if ( strcmp(seclevel, "authNoPriv") == 0 ) { 731 else if ( strcmp(seclevel, "authNoPriv") == 0 ) {
732 if ( secname == NULL || authpasswd == NULL) { 732 if ( secname == NULL || authpasswd == NULL) {
@@ -734,7 +734,7 @@ validate_arguments ()
734 print_usage (); 734 print_usage ();
735 exit (STATE_UNKNOWN); 735 exit (STATE_UNKNOWN);
736 } 736 }
737 authpriv = ssprintf(authpriv, "-l authNoPriv -a %s -u %s -A %s ", authproto, secname, authpasswd); 737 asprintf(&authpriv, "-l authNoPriv -a %s -u %s -A %s ", authproto, secname, authpasswd);
738 } 738 }
739 else if ( strcmp(seclevel, "authPriv") == 0 ) { 739 else if ( strcmp(seclevel, "authPriv") == 0 ) {
740 if ( secname == NULL || authpasswd == NULL || privpasswd == NULL ) { 740 if ( secname == NULL || authpasswd == NULL || privpasswd == NULL ) {
@@ -742,7 +742,7 @@ validate_arguments ()
742 print_usage (); 742 print_usage ();
743 exit (STATE_UNKNOWN); 743 exit (STATE_UNKNOWN);
744 } 744 }
745 authpriv = ssprintf(authpriv, "-l authPriv -a %s -u %s -A %s -x DES -X %s ", authproto, secname, authpasswd, privpasswd); 745 asprintf(&authpriv, "-l authPriv -a %s -u %s -A %s -x DES -X %s ", authproto, secname, authpasswd, privpasswd);
746 } 746 }
747 747
748 748