[monitoring-plugins] check_ircd: OpenBSD pledge(2)
Sven Nierlein
git at monitoring-plugins.org
Fri Oct 9 10:20:15 CEST 2026
Module: monitoring-plugins
Branch: master
Commit: 4bbb20149d4c0616351871ad9c98e77a3a7ce24f
Author: Alvar Penning <post at 0x21.biz>
Committer: Sven Nierlein <sven at nierlein.org>
Date: Wed Oct 7 23:42:23 2026 +0200
URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=4bbb2014
check_ircd: OpenBSD pledge(2)
Implement OpenBSD's pledge(2) for the check_ircd.pl Perl script. Since
this is a Perl script, OpenBSD::Pledge(3p) is called within an OS check.
https://man.openbsd.org/OpenBSD%3A%3APledge.3p
I have verified the code both on a current OpenBSD as well as on a
Linux, where it is skipped and does not result in an error.
---
plugins-scripts/check_ircd.pl | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/plugins-scripts/check_ircd.pl b/plugins-scripts/check_ircd.pl
index 15a70802..ac884cac 100755
--- a/plugins-scripts/check_ircd.pl
+++ b/plugins-scripts/check_ircd.pl
@@ -42,6 +42,11 @@
require 5.14.0;
+if ($^O eq 'openbsd') {
+ require OpenBSD::Pledge;
+ OpenBSD::Pledge::pledge( qw( rpath inet dns ) ) || die "pledge: $!";
+}
+
# -------------------------------------------------------------------[ Uses ]--
use strict;
More information about the Commits
mailing list