[Nagiosplug-devel] [ nagiosplug-Patches-1143849 ] Several bugfixes, enhancements and code cleanups
SourceForge.net
noreply at sourceforge.net
Fri Feb 18 07:24:16 CET 2005
Patches item #1143849, was opened at 2005-02-18 16:23
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1143849&group_id=29880
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Andreas Ericsson (ageric)
Assigned to: Nobody/Anonymous (nobody)
Summary: Several bugfixes, enhancements and code cleanups
Initial Comment:
These patches should apply somewhat cleanly to latest CVS.
A brief description;
ansiC.diff replaces occurences of the bsd-ism index(3)
wherever it was found with strchr().
progname.diff does with char *progname what glibc
automagically does with char *__progname.
check_tcp.diff reduces the LOC count drastically by
bundling duplicate code together. It also serves as an
example fix of what I like to call Wolly Thinking
(which is like fuzzy logic, only less so), and
separates protocol specifications according to OSI
layer where appropriate.
check_hpjd.diff fixes the snmpget command string,
enables outputting of several error messages should
more than one thing be awry, and reduces code amount
with ~50 lines.
timeout_status adds three global variables to utils.c;
timeout_status, status_strings, lowercase_status_strings.
It increases the status enum list with STATE_OOB, which
is considered to be the smallest out-of-bounds return
value for plugins.
It also adds logic to timeout_alarm_handler in utils.c
and netutils.c so that plugin authors may set the
status on timeout to whatever they like. This is
explained by an example in check_nt.c, which now
understands -T {ok,warning,critical} to mean just that.
check_mysql-paranoia.diff adds code to obscure username
and password from a ps listing, which might otherwise
reveal sensitive information.
perl-uselib.diff fixes bugs in
check_{file_age,mysql}.pl, which has a bad use lib line
and thus won't work unless executed from the same
directory as utils.pm resides in. This is possibly a
reverse-fix (other plugins should be fixed?) but I'm
sure you could make the necessary changes in that case.
check_icmp-bundled.diff enforces packet-intervals to be
honored unless sendqueue is empty and all sent packets
have arrived. It also raises the defaults somewhat to
work even in very crappy networks, as well as modifying
the verbosity, prettifies the -h output and makes
mention of the check_host mode.
silly.diff removes a lot of superfluous asprintf() and
strdup() calls which will cause memory leaks in Nagios
if it ever starts supporting plugins as NEBmodules. It
also stops anal leakage if weird code gives you that.
netutils-wrappers.diff reduces the LOC count in
netutils.c and allows clever compilers to consign
certain wrapper functions to oblivion.
check_snmp.diff reduces LOC count, reimplements support
for snmp v2c and removes a fair amount of stupid code.
All patches are heavily commented where appropriate, so
that anyone with moderate programming skills should
understand how everything works.
Apply with patch -p1 < [patch-file] in this order;
timeout_status
netutils-wrappers
ansiC
progname
silly
Other patches can be applied in random order.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1143849&group_id=29880
More information about the Devel
mailing list