diff options
author | Danijel Tasov <m@rbfh.de> | 2023-09-23 16:18:08 +0200 |
---|---|---|
committer | Danijel Tasov <m@rbfh.de> | 2023-09-23 16:18:08 +0200 |
commit | 8272d73e579739cccbfce61f7401cd5f8b9fd0e0 (patch) | |
tree | 42a06d16036835a81c63dbcdf71da0d8155dc4db /plugins-root | |
parent | f5c5a7438fa34f2ee2c0b9914806f9a26b56ba59 (diff) | |
download | monitoring-plugins-8272d73e579739cccbfce61f7401cd5f8b9fd0e0.tar.gz |
remove root check
We can perfectly do icmp without root by using capabalities. So,
instead of doing unsufficient checks beforehand, we just try and fail if
it doesn't work.
Signed-off-by: Danijel Tasov <m@rbfh.de>
Diffstat (limited to 'plugins-root')
-rw-r--r-- | plugins-root/check_icmp.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/plugins-root/check_icmp.c b/plugins-root/check_icmp.c index 2ad644ec..a7fad36a 100644 --- a/plugins-root/check_icmp.c +++ b/plugins-root/check_icmp.c | |||
@@ -417,9 +417,6 @@ main(int argc, char **argv) | |||
417 | bindtextdomain (PACKAGE, LOCALEDIR); | 417 | bindtextdomain (PACKAGE, LOCALEDIR); |
418 | textdomain (PACKAGE); | 418 | textdomain (PACKAGE); |
419 | 419 | ||
420 | /* print a helpful error message if geteuid != 0 */ | ||
421 | np_warn_if_not_root(); | ||
422 | |||
423 | /* we only need to be setsuid when we get the sockets, so do | 420 | /* we only need to be setsuid when we get the sockets, so do |
424 | * that before pointer magic (esp. on network data) */ | 421 | * that before pointer magic (esp. on network data) */ |
425 | icmp_sockerrno = udp_sockerrno = tcp_sockerrno = sockets = 0; | 422 | icmp_sockerrno = udp_sockerrno = tcp_sockerrno = sockets = 0; |