Issue: check_snmp v. 1.4.15 ^ snmpget v.5.4.1 - SNMP v3

Thomas Guyot-Sionnest dermoth at aei.ca
Sun Aug 1 15:54:25 CEST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10-07-30 04:24 PM, William Attwood wrote:
> I'm using SNMP v3 with check_snmp v1.4.15 and snmpget v5.4.1 and ran
> into an interesting issue.
> 
> I setup my Netgear switch to not need a password, and to use the
> Community public and the User public.  When I do this, I get a response
> from snmpget stating there was no securityName.
> 
> I can use snmpget to get the results I need:
> snmpget -v 3 -c public -u public 10.1.1.3 sysName.0
> 
> however, I cannot with check_snmp.  To correct this, on my side (and
> probably not correctly), I modified check_snmp.c:
> 
> FROM:
> 
> if (strcmp(seclevel, "noAuthNoPriv") == 0) {
>                         numauthpriv = 2;
>                         authpriv = calloc (numauthpriv, sizeof (char *));
>                         authpriv[0] = strdup ("-l");
>                         authpriv[1] = strdup ("noAuthNoPriv");
> 
> 
> TO:
> 
> if (strcmp(seclevel, "noAuthNoPriv") == 0) {
>                         numauthpriv = 4;
>                         authpriv = calloc (numauthpriv, sizeof (char *));
>                         authpriv[0] = strdup ("-l");
>                         authpriv[1] = strdup ("noAuthNoPriv");
>                         authpriv[2] = strdup ("-u");
>                         authpriv[3] = strdup (secname);
> 
> 
> 
> 
> Am I doing something incorrect in my implementation of SNMP v3?

It first glance this seems right, although I'm not an expert in SNMP....
FWIW there isn't much advantages in using SNMP v3 that way over v2c.

I'll have to review the code and make sure it doesn't break anything,
but I think this could make it in.

Thanks

- -- 
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxVfJEACgkQ6dZ+Kt5BchYlEQCfc7TFcvkA0ANd00ooCeXKvMj3
/TMAoKhKdHDyJ+FljCC1Ve87Mn869+vP
=rAz1
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm




More information about the Developers mailing list