summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2014-06-28Merge pull request #1263 from waja/coverity_fixesSven Nierlein7-11/+28
Serveral coverity fixes from nagios-plugins
2014-06-28tests: added check_dns performance data testSven Nierlein1-1/+2
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2014-06-28check_dns.c Added a bit more logic to thresholdsabrist1-4/+13
Added two if elses to cover when only one threshold is set.
2014-06-28check_dns: add warning and critical thresholds to perfdataJean-Claude Computing1-1/+8
2014-06-28Cleaned up status output of check_tcp changesabrist1-1/+1
2014-06-28check_tcp: also display the server addr when host_specified is set. This ↵Davide Madrisan1-2/+7
will help the admins when multiple checks are configured Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2014-06-28check_nt.c - Changed 'Mb' to 'MB' in MEMUSE.refs/pull/1264/headabrist1-2/+2
2014-06-28lib/utils_cmd.c - Free file descriptorrefs/pull/1263/headSpenser Reinhardt1-0/+3
Coverity 66502 - File descriptor fd in cmd_file_read is never closed, and thus file is left open after usage throughout runtime. - SR
2014-06-28plugins/negate.c - Function should not return.Spenser Reinhardt1-2/+2
Coverity 66479 - validate_arguments has no need to return anything, as it dies on error, yet was set to return an int. Set to void to resolve warning.
2014-06-28plugins/negate.c - Reorder if statement, aiobSpenser Reinhardt1-2/+1
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
2014-06-28plugins-root/check_dhcp.c - array out of boundsSpenser Reinhardt1-1/+1
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
2014-06-28plugins/check_http.c - leakage fixSpenser Reinhardt1-4/+6
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
2014-06-28plugins/check_ntp.c - Verify struct from responseSpenser Reinhardt1-2/+11
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
2014-06-28plugins/check_real.c - recv string null terminateSpenser Reinhardt1-0/+1
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.
2014-06-28plugins/check_apt.c - Print uninitialized eregSpenser Reinhardt1-0/+3
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.
2014-06-28Include common.h before any system headers.refs/pull/1262/headEric J. Mislivec2-4/+3
This should fix some problems building on AIX.
2014-06-24Merge pull request #1261 from sni/masterSven Nierlein5-8/+72
tests: always build and test on travis
2014-06-24tests: always build and test on travisrefs/pull/1261/headSven Nierlein5-8/+72
also make test is now working on travis-ci Signed-off-by: Sven Nierlein <sven@nierlein.de>
2014-06-23check_ide_smart: Fixing spelling bugJan Wagner4-4/+4
2014-06-23check_mrtg: Fixing spelling bugJan Wagner4-4/+4
2014-06-23check_ups/check_dbi: Fixing spelling bugJan Wagner2-6/+6
2014-06-22NEWS: Add missing entries for the upcoming releaseHolger Weiss1-2/+16
2014-06-22THANKS.in: Add new authorsHolger Weiss1-0/+11
Add the new Git commit authors to the THANKS.in file.
2014-06-22NEWS: Add missing tab charactersHolger Weiss1-2/+2
2014-06-22check_radius.c: Add newline to die() callsHolger Weiss1-14/+14
Our die() function doesn't append a newline character to the message.
2014-06-22configure.ac: Change RADIUS library preferencesHolger Weiss1-7/+7
Prefer the FreeRADIUS Client library over radiusclient-ng, and prefer that one over the original radiusclient library.
2014-06-22check_radius: Support FreeRADIUS Client libraryHolger Weiss4-13/+30
Allow for using the FreeRADIUS Client library instead of radiusclient or radiusclient-ng. The latter two projects are dead. Closes #1231.
2014-06-22REQUIREMENTS: Update radiusclient-ng URLHolger Weiss1-1/+1
The project was moved to SourceForge.net.
2014-06-21Add UID to state retention file pathHolger Weiss3-3/+11
Add the UID of the invoking user to the state retention file path. This helps solving permission issues when different users run the same plugin.
2014-06-20NEWS: s/MP_STATE_DIRECTORY/MP_STATE_PATH/Holger Weiss1-1/+1
NAGIOS_PLUGIN_STATE_DIRECTORY was renamed to MP_STATE_PATH, not to MP_STATE_DIRECTORY.
2014-06-18lib/parse_ini.c: Print proper read error messageHolger Weiss1-1/+2
Print a useful error message if opening the configuration file fails.
2014-06-18lib/parse_ini.c: Drop privileges for reading fileHolger Weiss1-0/+10
Read the configuration file with privileges temporarily dropped if the code is used by a setuid plugin.
2014-06-18lib/parse_ini.c: Add newline to die() callsHolger Weiss1-2/+2
Our die() function doesn't append a newline character to the message.
2014-06-18lib/parse_ini.c: Cosmetic changeHolger Weiss1-4/+1
Replace an "if" with the ternary operator.
2014-06-18Add Gnulib module "idpriv-droptemp"Holger Weiss6-4/+352
2014-06-18Use FindBin consistently across Perl pluginsHolger Weiss2-2/+4
Use Perl's FindBin module to locate the path to utils.pm in check_file_age.pl and check_mssql.pl, just as we do in other Perl plugins.
2014-06-18plugins/runcmd.c: Remove superfluous newlineHolger Weiss1-1/+1
The puts(3) function already appends a newline character to the string.
2014-06-18lib/parse_ini.c: Search for INI file in subdirsHolger Weiss1-0/+2
Add two path names to the list of default INI file locations, as some users/distributions prefer to put configuration files into subdirectories.
2014-06-18lib/parse_ini.c: Add comment on NAGIOS_CONFIG_PATHHolger Weiss1-15/+17
We might want to spit out a warning when NAGIOS_CONFIG_PATH is used. While at it, move the function that handles this environment variable to the bottom.
2014-06-18lib/parse_ini.c: Cosmetic changes to commentsHolger Weiss1-16/+20
2014-06-18lib/parse_ini.c: Fix Clang warningsHolger Weiss1-8/+7
2014-06-18lib/parse_ini.[ch]: Change code formattingHolger Weiss2-156/+192
Change the indentation and formatting of the code in lib/parse_ini.c. This breaks patches against that file and makes it harder to track its history, but it (hopefully) improves readability a lot.
2014-06-17lib/parse_ini.c: Don't cast malloc(3) resultHolger Weiss1-2/+2
There's no need to cast malloc(3)'s return value.
2014-06-17lib/parse_ini.c: Remove outdated comment and codeHolger Weiss1-15/+10
The lib/parse_ini.c:np_get_defaults() function now dies if no configuration file is found.
2014-06-17lib/parse_ini.c: Read $MP_CONFIG_FILEHolger Weiss1-1/+2
Read $MP_CONFIG_FILE if that variable is set in the environment.
2014-06-17lib/parse_ini.c: Read "monitoring-plugins.ini"Holger Weiss1-0/+4
Read "monitoring-plugins.ini" if that file exists, but fall back to reading "plugins.ini" or "nagios-plugins.ini" for backward compatibility.
2014-06-17lib/parse_ini.[ch]: Simplify codeHolger Weiss2-110/+49
Rewrite the code that looks up the INI configuration file path (used by the Extra-Opts feature) in order to improve readability. The behaviour should not have changed.
2014-06-13tests: freebsds snmpd does not use quotesSven Nierlein1-1/+1
when returning syscontact. So make them optional since we want to test check_snmp and not the snmpd. Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
2014-06-13tests: check_proc tests fail if uid -2 does not map to nobodySven Nierlein1-0/+1
so make sure our tests only run if -2 maps to nobody Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
2014-06-13tests: fping checks require being root or setuid rootSven Nierlein2-9/+34
on the fping binary. Check this before running the test. Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>