Commit graph

2005 commits

Author SHA1 Message Date
RincewindsHat
a00c412e7b Fixes for -Wnonnull-compare 2023-04-18 00:35:09 +02:00
Jan Wagner
24e99301b4 Fix a psuedo typo 2023-04-17 08:23:28 +02:00
Jan Wagner
0f3703e641 Fix a lot of typos reported by codespell 2023-04-14 18:35:00 +00:00
donien
cc69e8f76b Fix 'requres' typo 2023-04-13 17:15:16 +02:00
Lorenz
ac3032a0ba
Merge pull request #1850 from sni/fix_check_snmp_multiplier
check_snmp: disable multiplier when unused
2023-03-27 13:13:03 +02:00
Sven Nierlein
6e64973a44 simplify code
if statement is always true at this point, so remove it.
2023-03-27 12:59:53 +02:00
Lorenz
482aa6c7fe
Merge pull request #1855 from monitoring-plugins/curlfreebsdfixes
check_curl: including netinet/in.h (for FreeBSD), fixed an ambigous compare warning
2023-03-27 12:32:22 +02:00
Christian Kujau
3e3e225b3f check_procs: add a test for the newly added -X option.
$ make test
[...]
perl -I .. -I .. ../test.pl
No application (check_curl) found for test harness (check_curl.t)
No application (check_snmp) found for test harness (check_snmp.t)
./t/check_procs.t ...... ok
./tests/check_nt.t ..... ok
./tests/check_procs.t .. ok
All tests successful.
Files=4, Tests=73,  8 wallclock secs ( 0.05 usr  0.02 sys +  0.38 cusr
0.22 csys =  0.67 CPU)
Result: PASS

Signed-off-by: Christian Kujau <lists@nerdbynature.de>
2023-03-21 11:49:08 +01:00
Christian Kujau
9c495e2aef check_procs: Implement --exclude-process to exclude specific processes.
Signed-off-by: Christian Kujau <lists@nerdbynature.de>
2023-03-21 11:49:08 +01:00
Sven Nierlein
bf82700078
Merge branch 'master' into fix_check_snmp_multiplier 2023-03-17 11:37:06 +01:00
Andreas Baumann
cf90f0de7b check_curk: including netinet/in.h (for FreeBSD), fixed an ambigous compare warning 2023-03-16 16:21:46 +01:00
RincewindsHat
8a8ee58e89 check_swap: Remove unnecessary and problematic includes 2023-03-16 15:26:52 +01:00
Sven Nierlein
c874f950e8 check_snmp: disable multiplier when unused
- if no multiplier is set, simply return the given string. Otherwise we would strip off the unit.
 - if used, allocate new space to hold the result which might be larger than the initial input

Signed-off-by: Sven Nierlein <sven@consol.de>
2023-03-15 09:51:18 +01:00
Lorenz
0c54644f6a
Merge pull request #1842 from sthen/patch-1
check_radius: cope with radcli-1.3.1 RC_BUFFER_LEN
2023-03-12 20:34:50 +01:00
Lorenz
73c24a393b
Merge pull request #1847 from monitoring-plugins/curlfix1845
Fix for SSL host list messup when picking from multiple IPs (#1844)
2023-03-12 10:59:39 +01:00
Andreas Baumann
ea53555f2d check_curl: removed a superflous variable 2023-03-11 11:40:00 +01:00
Lorenz
75342b5385
Merge branch 'master' into patch-1 2023-03-11 11:34:47 +01:00
Lorenz
357787868b
Merge pull request #1801 from KriSchu/feature_check_disk_add_ignore_missing_option
check_disk: add ignore-missing option to return OK for missing fs
2023-03-11 10:27:43 +01:00
Andreas Baumann
fc927e98db fixed a wrong compare and a wrong size in strncat 2023-03-08 16:10:45 +01:00
Barak Shohat
2902381c5d check_curl.c: Include all IPs from getaddrinfo() in curl DNS cache 2023-03-08 11:56:43 +02:00
Andreas Baumann
03f86b5d08 check_curl: in SSL host caching mode try to connect and bind and take the first getaddrinfo result which succeeds 2023-03-07 19:51:33 +01:00
Kristian Schuster
3e7da5f970
check_disk: use cleaner code for ignore-missing option
- use datatype bool for new vars ignore_missing and path_ignored instead of int
- directly initialize preamble and ignored_preamble with their strings
2023-03-06 14:03:10 +01:00
Kristian Schuster
e102b8a49e
check_disk: fix ugly output with -e option and adapt tests accordingly 2023-02-20 02:03:01 +01:00
Kristian Schuster
a58293a0c2
check_disk: fix tests by setting correct test number and escaping line end regex 2023-02-20 01:27:23 +01:00
Kristian Schuster
a0d4277721
Merge remote-tracking branch 'origin/master' into feature_check_disk_add_ignore_missing_option 2023-02-19 23:49:18 +01:00
Kristian Schuster
ca3d59cd69
check_disk: add new tests for new ignore-missing feature 2023-02-19 23:00:21 +01:00
Kristian Schuster
ba78c32018
check_disk: still allow check of available disks with ignore-missing param used
Also add reporting of ignored paths. When paths are provided by -p and/ or -r and
one path does not match a mounted disk, checking available disks is still
possible. Paths provided by -p are reported as ignored, when not available. Due
to code structure, this is not possible for -r unfortunately.
2023-02-19 22:49:30 +01:00
Andreas Baumann
ad6b638acb using real boolean in check_curl 2023-02-17 14:03:55 +01:00
Andreas Baumann
8e1bbf5e6e changed #else/#if to #elif in libcurl library checks 2023-02-12 15:09:02 +01:00
Andreas Baumann
6563267c3a fixed double frees when doing old-style redirects 2023-02-12 13:16:25 +01:00
Andreas Baumann
40da85e691 better cleanup of curl structures and buffers 2023-02-12 12:11:38 +01:00
Andreas Baumann
f6978deaa1 added --cookie-jar and doing proper cleanup of libcurl 2023-02-11 19:11:07 +01:00
Andreas Baumann
27b0c69645 fixed regerror is MAX_INPUT_BUFFER writting into too small errbuf 2023-02-11 18:39:24 +01:00
Andreas Baumann
f867d7b440 Merge branch 'master' into curlfixes 2023-02-11 07:20:24 +01:00
Lorenz
c07206f2cc
Merge pull request #1832 from RincewindsHat/gnulib_update_2023
Gnulib update 2023 and attendant fixes
2023-02-10 11:43:20 +01:00
Lorenz
e92046f810
Merge pull request #1839 from monitoring-plugins/gnutlsfix
fallback to SSL_CTX_use_certificate_file for gnutls
2023-02-10 10:31:09 +01:00
Lorenz Kästle
28b5a1cc45 Make preprocessor fallback for gnutls more readable 2023-02-09 00:35:20 +01:00
Stuart Henderson
6bbe0b7b0f
cope with radcli-1.3.1 RC_BUFFER_LEN
radcli 1.3.1 now uses RC_BUFFER_LEN instead of BUFFER_LEN. Add an #ifdef to allow working with either.
2023-02-08 16:35:22 +00:00
Lorenz
5a50b260ee
Merge branch 'master' into gnulib_update_2023 2023-02-06 18:51:40 +01:00
Andreas Baumann
9734c439cb Merge branch 'master' into curlfixes 2023-02-06 17:23:55 +01:00
RincewindsHat
03efbb8e4f check_http: Implement special case test for zero size chunk only 2023-02-06 12:15:46 +01:00
RincewindsHat
6d3e44d2d8 check_http: Handle chunked encoding without actual content correctly 2023-02-06 11:39:44 +01:00
Andreas Baumann
53f07a468d using CURLOPT_REDIR_PROTOCOLS_STR instead of CURLOPT_REDIR_PROTOCOLS for curl >= 7.85.0 2023-02-05 20:34:41 +01:00
Andreas Baumann
6f0ce3804a fallback to SSL_CTX_use_certificate_file for gnutls 2023-02-04 16:19:46 +01:00
RincewindsHat
c4704e163e sslutils.c: Move function after a function it uses to avoid forward declarations 2023-02-02 12:03:44 +01:00
Lorenz Kästle
f79eb4f2ca Link plugins against libcrypto to make hashes available 2023-02-01 00:57:42 +01:00
Lorenz Kästle
05ab60f808 check_disk: Remove weird code (workaround?) which broke with gnulib update 2023-02-01 00:56:44 +01:00
Lorenz Kästle
d3fbcd1220 check_http: Add space for ending NULL byte in array for chunked encoding 2023-01-30 13:33:46 +01:00
Lorenz Kästle
d9528c265b check_http: Fix memory reallocation error in chunk decoding logic
This patch should fix an error with the way memory reallocation was
used, which resulted in "realloc(): invalid next size".
It is not completely clear to me as to what caused this problem, but
apparently one can not depend handing a pointer to "realloc(3)" and
expect that it still works afterwards, but one should/must use the one
returned by the function.

Also this patch replaces a variable which was used to remember the
position in the array by just computing that from the current values.
2023-01-30 12:45:20 +01:00
Lorenz
67b472f9d1
check_disk: Clarify usage possibilites (#1745)
* Clarify usage possibilites of check_disk

* Remove superfluous newlines

Co-authored-by: waja <waja@users.noreply.github.com>
2023-01-20 12:08:15 +01:00