check_ssh: check protocol

It would be useful to be able to detect the protocols supported by the remote
ssh server to locate any using the insecure ssh v1 protocol. This patch
attempts to match against the protocol string in the ssh response.

Example:

check_ssh -H my.host.com -P 2.0
--
Just turning attached patch of github issue #780 into a push request.
(Closes #780)
Fix compilation with GnuTLS

GnuTLS doesn't provide a SSL_CTX_check_private_key() function.

Closes #1254.
configure.ac: Remove unused code

We no longer set LIBGNUTLS_CONFIG, as GnuTLS no longer ships a
"libgnutls-config" tool.
tests: parts of the check_procs test only work when uid -2 exists

skip those tests if the uid does not exist

Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
tests: testCmd has own timeout which overwrites local one

so add configurable/optional timeout to testCmd.

Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
require at least HTTP::Daemon 6.01

since the test uses send_header from HTTP::Daemon::ClientConn which has been introduced in
HTTP::Daemon 6.01
tests: fping checks require being root or setuid root

on the fping binary. Check this before running the test.

Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
tests: check_proc tests fail if uid -2 does not map to nobody

so make sure our tests only run if -2 maps to nobody

Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
tests: freebsds snmpd does not use quotes

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>
lib/parse_ini.[ch]: Simplify code

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.
lib/parse_ini.c: Read "monitoring-plugins.ini"

Read "monitoring-plugins.ini" if that file exists, but fall back to
reading "plugins.ini" or "nagios-plugins.ini" for backward
compatibility.
lib/parse_ini.c: Read $MP_CONFIG_FILE

Read $MP_CONFIG_FILE if that variable is set in the environment.
lib/parse_ini.c: Remove outdated comment and code

The lib/parse_ini.c:np_get_defaults() function now dies if no
configuration file is found.
lib/parse_ini.c: Don't cast malloc(3) result

There's no need to cast malloc(3)'s return value.
lib/parse_ini.[ch]: Change code formatting

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.
lib/parse_ini.c: Fix Clang warnings
lib/parse_ini.c: Cosmetic changes to comments
lib/parse_ini.c: Add comment on NAGIOS_CONFIG_PATH

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.
lib/parse_ini.c: Search for INI file in subdirs

Add two path names to the list of default INI file locations, as some
users/distributions prefer to put configuration files into
subdirectories.
plugins/runcmd.c: Remove superfluous newline

The puts(3) function already appends a newline character to the string.