summaryrefslogtreecommitdiffstats
path: root/plugins
AgeCommit message (Collapse)AuthorFilesLines
2025-08-27check_snmp: use snmp v2c if community is givenLorenz Kästle1-0/+8
2025-08-27Fix one more typoLorenz Kästle1-1/+1
2025-08-27check_snmp: fix typosLorenz Kästle1-6/+6
2025-08-27check_snmp: declare internal functions staticLorenz Kästle1-2/+2
2025-08-27check_snmp: remove leftover multiply functionLorenz Kästle1-48/+0
2025-08-27check_snmp: fix/adapt testsLorenz Kästle1-62/+41
2025-08-27check_snmp: hopefully fix helpersLorenz Kästle2-32/+41
2025-08-27check_snmp: Improve error handlingLorenz Kästle1-6/+15
2025-08-27check_snmp: rebuild threshold parsingLorenz Kästle5-65/+125
2025-08-25rebuild check_snmpLorenz Kästle3-926/+838
2025-08-11Merge branch 'master' into refactor/check_usersLorenz Kästle34-3626/+3689
2025-08-11check_users: Use sd_get_uids instead of sd_get_sessionLorenz Kästle1-1/+1
Previously check_users in combination with systemd used sd_get_sessions (3) to aquire the number of users, probably with the idea that every users opens a session. Turns out, that a user can have multiple sessions and we only really want to know how many users there are. This commit changes to sd_get_uids (3) to achieve that target.
2025-08-01clang-formatLorenz Kästle1-29/+43
2025-08-01check_ssh: Put variable in the correct scopeLorenz Kästle1-2/+1
2025-08-01check_ssh: Fix format expressionLorenz Kästle1-1/+1
2025-08-01check_ssh: fix data type to allow for error checkingLorenz Kästle1-2/+2
2025-08-01Merge pull request #2133 from rlaager/fix-check_ssh-buffer-overflowLorenz Kästle1-4/+6
Fix check ssh buffer overflow
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_load: fix testsLorenz Kästle1-3/+3
2025-07-06Merge branch 'master' into refactor/check_loadLorenz Kästle21-2919/+2595
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-28Merge branch 'master' into refactor/check_procsLorenz Kästle38-3730/+4034
2025-06-20Merge pull request #2125 from RincewindsHat/refactor/check_icmpLorenz Kästle1-1/+1
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-12Remove options if fping version is too low and die directlyLorenz Kästle1-1/+5
2025-06-12Remove unnecessary newlineLorenz Kästle1-1/+0
2025-06-12check_fping: small style improvementLorenz Kästle2-3/+3
2025-06-12Implement new fping options for fping 5.2 and 5.3Lorenz Kästle2-8/+96
fping 5.2 and 5.3 add some new useful command line options which this commit add to check_fping. These are: * --fwmark - sets a firewall mark in the packages to make them identifiable (fping 5.2) * --icmp-timestamp - fping uses ICMP timestamp instead of ICMP Echo (fping 5.2) * --check-source - fping discards replies which originate not from the target address (fping 5.2) The fping release notes describe theses options ( https://github.com/schweikert/fping/releases ) in a little bit more detail. Currently the help display for those options is only shown when fping was available in the appropriate version during compilation.
2025-05-18utils: Make fmt function for compilerLorenz Kästle1-1/+1
2025-05-07Remove un-needed flagsWilliam1-42/+0
2025-05-07Improve logicWilliam1-7/+41
2025-05-07Harden check with unspecWilliam1-2/+2
2025-05-07Improve handling of -4/-6William1-11/+22
If fping is used with a target that has dual stack v4/v6, then due to the logic during command construction, ipv4 will never be checked as v6 is preferred by fping. This explicitly flags -4/-6 when it is requested by the user.
2025-04-21check_http: Adding deprecation textJan Wagner1-0/+10
2025-03-31Merge pull request #2113 from RincewindsHat/refactor/check_diskLorenz Kästle8-689/+1723
Refactor/check disk
2025-03-31Try fixing some testsLorenz Kästle1-8/+9
2025-03-31check_disk: decrease precision to avoid false negatives with small ↵Lorenz Kästle1-1/+8
measurement changes
2025-03-31Fixes problems after a4cf2e79f75dce3828be21726f10c755f652f710Lorenz Kästle3-25/+41
2025-03-31Fix some typos with unitsLorenz Kästle1-6/+6
2025-03-30Add debugging to tests for CILorenz Kästle1-0/+3
2025-03-30Remove cool, comfy c23 functionality for some dirty old hacksLorenz Kästle3-32/+50
2025-03-30Codespell fixesLorenz Kästle2-5/+5
2025-03-30Address check_disk changes in testsLorenz Kästle2-118/+154
2025-03-30Refactor check_disk and library functionsLorenz Kästle4-724/+1048
2025-03-18check_disk: Remove unnecessary NULL checksLorenz Kästle1-18/+6
2025-03-18Refactor test_check_disk.cLorenz Kästle1-42/+44
2025-03-18Remove some unused codeLorenz Kästle1-8/+0