check_snmp on Sol 10 mangling data
Kyle Tucker
kylet at panix.com
Mon Mar 6 19:58:53 CET 2006
After playing with gdb all day, I found the culprit. The array of chars
named "type" was getting initialized with the crud on Solaris 10. On 8
it was zeroed out at runtime. Using bzero on it before it's used fixed
it up.
*** check_snmp.c.orig Mon Mar 6 08:05:26 2006
--- check_snmp.c Mon Mar 6 13:45:53 2006
***************
*** 242,247 ****
--- 242,249 ----
}
/* We strip out the datatype indicator for PHBs */
+ /* Clean up type array */
+ bzero(type, sizeof(type));
if (strstr (response, "Gauge: "))
show = strstr (response, "Gauge: ") + 7;
else if (strstr (response, "Gauge32: "))
--
- Kyle
---------------------------------------------
kylet at panix.com http://www.panix.com/~kylet
---------------------------------------------
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list