[Nagiosplug-checkins] CVS: nagiosplug/plugins check_snmp.c,1.16,1.17
Subhendu Ghosh
sghosh at users.sourceforge.net
Mon Nov 11 14:16:04 CET 2002
Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory usw-pr-cvs1:/tmp/cvs-serv16366
Modified Files:
check_snmp.c
Log Message:
should use asprintf
Index: check_snmp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_snmp.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** check_snmp.c 11 Nov 2002 20:19:01 -0000 1.16
--- check_snmp.c 11 Nov 2002 22:15:55 -0000 1.17
***************
*** 36,41 ****
[-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"
#define LONGOPTIONS "\
--- 36,41 ----
[-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"
#define LONGOPTIONS "\
***************
*** 727,731 ****
if ( (strcmp(seclevel, "noAuthNoPriv") == 0) || seclevel == NULL ) {
! authpriv = ssprintf(authpriv, "%s", "-l noAuthNoPriv" );
}
else if ( strcmp(seclevel, "authNoPriv") == 0 ) {
--- 727,731 ----
if ( (strcmp(seclevel, "noAuthNoPriv") == 0) || seclevel == NULL ) {
! asprintf(&authpriv, "%s", "-l noAuthNoPriv" );
}
else if ( strcmp(seclevel, "authNoPriv") == 0 ) {
***************
*** 735,739 ****
exit (STATE_UNKNOWN);
}
! authpriv = ssprintf(authpriv, "-l authNoPriv -a %s -u %s -A %s ", authproto, secname, authpasswd);
}
else if ( strcmp(seclevel, "authPriv") == 0 ) {
--- 735,739 ----
exit (STATE_UNKNOWN);
}
! asprintf(&authpriv, "-l authNoPriv -a %s -u %s -A %s ", authproto, secname, authpasswd);
}
else if ( strcmp(seclevel, "authPriv") == 0 ) {
***************
*** 743,747 ****
exit (STATE_UNKNOWN);
}
! authpriv = ssprintf(authpriv, "-l authPriv -a %s -u %s -A %s -x DES -X %s ", authproto, secname, authpasswd, privpasswd);
}
--- 743,747 ----
exit (STATE_UNKNOWN);
}
! asprintf(&authpriv, "-l authPriv -a %s -u %s -A %s -x DES -X %s ", authproto, secname, authpasswd, privpasswd);
}
More information about the Commits
mailing list