summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2025-07-14Merge pull request #2134 from RincewindsHat/fix/check_ntp_peer_fmt_convLorenz Kästle1-3/+3
check_ntp_peer: fix invalid conversion in printf
2025-07-14check_ntp_peer: fix invalid conversion in printfLorenz Kästle1-3/+3
2025-07-11check_ssh: Correct type on len variableRichard Laager1-1/+1
strlen() returns a size_t. Signed-off-by: Richard Laager <rlaager@wiktel.com>
2025-07-11check_ssh: Fix buffer overflowRichard Laager1-3/+5
A buffer overflow was occurring when the server responded with: Exceeded MaxStartups\r\n glibc would then abort() with the following output: *** buffer overflow detected ***: terminated It was the memset() that was overflowing the buffer. But the memmove() needed fixing too. First off, there was an off-by-one error in both the memmove() and memset(). byte_offset was already set to the start of the data _past_ the newline (i.e. len + 1). For the memmove(), incrementing that by 1 again lost the first character of the additional output. For the memset(), this causes a buffer overflow. Second, the memset() has multiple issues. The comment claims that it was NULing (sic "null") the "rest". However, it has no idea how long the "rest" is, at this point. It was NULing BUFF_SZ - byte_offset + 1. After fixing the off-by-one / buffer overflow, it would be NULing BUFF_SZ - byte_offset. But that doesn't make any sense. The length of the first line has no relation to the length of the second line. For a quick-and-dirty test, add something like this just inside the while loop: memcpy(output, "Exceeded MaxStartups\r\nnext blah1 blah2 blah3 blah4\0", sizeof("Exceeded MaxStartups\r\nnext blah1 blah2 blah3 blah4\0")); And, after the memmove(), add: printf("output='%s'\n", output); If you fix the memset() buffer overflow, it will output: output='ext blah1 blah2 blah3 ' As you can see, the first character is lost. If you then fix the memmove(), it will output: output='next blah1 blah2 blah3' Note that this is still losing the "blah4". After moving the memset() after byte_offset is set to the new strlen() of output, then it works correctly: output='next blah1 blah2 blah3 blah4' Signed-off-by: Richard Laager <rlaager@wiktel.com>
2025-07-06check_curl: clang-formatLorenz Kästle1-276/+495
2025-07-06Fix merge errorLorenz Kästle1-1/+1
2025-07-06Merge branch 'master' into refactor/check_curlLorenz Kästle96-8612/+9657
2025-07-06Merge pull request #2109 from RincewindsHat/refactor/check_loadLorenz Kästle5-294/+444
Refactor/check load
2025-07-06check_load: fix testsLorenz Kästle1-3/+3
2025-07-06Merge branch 'master' into refactor/check_loadLorenz Kästle52-5134/+5254
2025-07-06Make multiline output look betterLorenz Kästle1-1/+32
2025-07-06check_load some number type fixesLorenz Kästle2-7/+7
2025-07-06check_load: Add top x functionality to outputLorenz Kästle1-1/+3
2025-07-06check_load: remove useless code and do some formattingLorenz Kästle1-13/+23
2025-06-29Merge pull request #2101 from RincewindsHat/refactor/check_procsLorenz Kästle4-579/+634
Refactor/check procs
2025-06-28Merge branch 'master' into refactor/check_procsLorenz Kästle70-5945/+6694
2025-06-23Merge pull request #2116 from RincewindsHat/refactor/check_dhcpLorenz Kästle4-390/+554
Refactor/check dhcp
2025-06-23Reapply "check_dhcp: reduce number of tests for weird reasons"Lorenz Kästle1-1/+1
This reverts commit 612d261cbf467c82f0dcc0ed63e7584d91f194c4.
2025-06-23Revert "check_dhcp: reduce number of tests for weird reasons"Lorenz Kästle1-1/+1
This reverts commit 52338c3423d4b10d2bbeec7a120c7dd2a98fa092.
2025-06-23Add check_dhcp related files to MakefileLorenz Kästle1-1/+2
2025-06-23check_dhcp: reduce number of tests for weird reasonsLorenz Kästle1-1/+1
2025-06-23Adapt testsLorenz Kästle1-10/+14
2025-06-23check_dhcp: little fix to outputLorenz Kästle1-1/+1
2025-06-23Refactor check_dhcpLorenz Kästle2-343/+448
2025-06-23check_dhcp: clang-formatLorenz Kästle1-65/+119
2025-06-23Merge pull request #2130 from RincewindsHat/check_icmp/adjustementsLorenz Kästle3-153/+157
Check icmp/adjustements
2025-06-23check_icmp: Add missing line ending in helpLorenz Kästle1-1/+1
2025-06-23check_icmp: trigger help before anything importantLorenz Kästle1-4/+6
2025-06-23check_icmp: Add comment to configLorenz Kästle1-1/+3
2025-06-23check_icmp: add long options to helpLorenz Kästle1-27/+31
2025-06-23check_icmp: remove dead commentLorenz Kästle1-8/+0
2025-06-23check_icmp: remove unnecessary variableLorenz Kästle3-4/+1
2025-06-23check_icmp: correct output stringsLorenz Kästle1-12/+12
2025-06-23check_icmp: remove paket_interval, was never used anywayLorenz Kästle3-53/+37
2025-06-23Fix typoLorenz Kästle1-1/+1
2025-06-23check_icmp: cleanup some leftover commentsLorenz Kästle1-22/+1
2025-06-23check_icmp: add long options, add output format optionLorenz Kästle3-3/+57
This commit switches check_icmp from getopt to getopt_long to provide long options too and (most importantly) homogenize option parsing between the different plugins.
2025-06-23Improve check_icmp help outputLorenz Kästle1-29/+19
2025-06-20Merge pull request #2125 from RincewindsHat/refactor/check_icmpLorenz Kästle12-1345/+1990
Refactor check_icmp: - Far less global variables - Proper IPv6/legacy IP dual stack functionality (allowed mixed v4/v6 hosts) - Improved readability/understandability - General cleanup
2025-06-20Fix number of testsLorenz Kästle1-1/+1
2025-06-20Fix test with weird argumentsLorenz Kästle1-1/+1
2025-06-20check_icmp: Remove signal handling and timeoutsLorenz Kästle4-53/+16
The timeout option was redundant in that the runtime of check_icmp was always limited by the input parameters and therefore timeout gets removed with this commit to avoid that confusion. The rest of the signal handlings was removed too, since the added complexity does not provide sufficient returns. If check_icmp gets a signal, it now dies like most other programs instead of trying to save some things and return a (arguably wrong) result.
2025-06-19Override state with min_hosts_aliveLorenz Kästle1-25/+14
2025-06-19Implement flexible state override functionsLorenz Kästle2-24/+90
2025-06-19Reintroduce min_hosts_aliveLorenz Kästle1-2/+22
2025-06-17Fix possible multiplication overflow?Lorenz Kästle1-1/+1
2025-06-17Improve error detection for threshold parsersLorenz Kästle2-35/+65
2025-06-12Merge pull request #2129 from RincewindsHat/check_fping_5.3_optionsLorenz Kästle3-12/+136
Add fping 5.2 and 5.3 options to check_fping
2025-06-12Remove options if fping version is too low and die directlyLorenz Kästle1-1/+5
2025-06-12Remove unnecessary newlineLorenz Kästle1-1/+0