sshutils prints the expiry time of certificates in US format
this patch uses the strftime %c, I don't know how portable that is
Thanks to Neil Prockter.
Closes#1188Closes#1161Closes#977Closes#976Closes#975Closes#840Closes#382
The perfdata output violates the current Nagios Plugin Development Guidelines
(http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN202 :
"space separated list of label/value pairs").
Thus the Addon PNP did not read the perdata correctly.
The patch replaces the commas with spaces in the perfdata output.
Many thanks to Patric Wust.
---
Closes#1169 and #721.
Forking raises a race condition, where the parent might run the
test before the child has had time to fork. If that happens,
an error similar to this is produced:
Failed test 'Output correct'
at ./t/check_procs.t line 32.
'PROCS OK: 0 processes with args 'sleep 7' | processes=0;;;0;'
doesn't match '/^PROCS OK: 1 process?/'
Sleeping a bit should avoid the problem. It might be enough to
sleep less than a second, but perl's built-in sleep function only
supports integer seconds.
In our build environment, the build failed 3 of 4 times before
this patch. After the patch it failed 0 of 7 times.
Signed-off-by: Mikael Falkvidd <mfalkvidd@op5.com>
As the FindBin module doesn't work with ePN, set the path to utils.pm
explicitly at build time. Keep using FindBin additionally, so that the
plugins can also be executed from the build directory.
Closes#1271.
As it is possible to use capabilities(7) on linux or solaris
privileges for example, it is not necessary in all cases to
have those binaries making use of setuid.
Coverity 66480 - Potential array index out of bounds, since result was not verified to be positive prior to using as an index for state[]. Simply reording the if statement should resolve the issue. - SR
Coverity 66488 - offer_packet->options has a max size of 312. It was being used in a loop verifying less than 311, but increasing by 2 per loop, causing a possible array index out of bounds. Changed to checking less than max length - 1. - SR
Coverity 66514 - Possible leakage and overflow with addr in redirect functionality. Not confirmed as null terminated, and externally gathered. Restrict string comparisons and duplications by size. - SR
Coverity 66524 - req.data is not neccessarily null terminated but still feed to printf statements. This both does that, and verifies the struct more so than before. - SR
Recv into buffer is not properly null terminated prior to strstr and possible other string functions expecting a null termination. Simply take bytes received and use as an index to append \0 after. We are creating buffer[] with size of MAX_INPUT_BUFFER and recv with MAX_INPUT_BUFFER-1 so this should never overflow.
Coverity 66531 - ereg.buffer can be printed without being initialized if do_include and do_exclude are null and critical is an invalid regex. While minor this may leak memory and cause undefined behavior.