summaryrefslogtreecommitdiffstats
path: root/plugins/check_ssh.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_ssh.c')
-rw-r--r--plugins/check_ssh.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/check_ssh.c b/plugins/check_ssh.c
index f6c8d551..84b70a53 100644
--- a/plugins/check_ssh.c
+++ b/plugins/check_ssh.c
@@ -61,6 +61,14 @@ static int ssh_connect(mp_check *overall, char *haddr, int hport, char *remote_v
61 char *remote_protocol); 61 char *remote_protocol);
62 62
63int main(int argc, char **argv) { 63int main(int argc, char **argv) {
64#ifdef __OpenBSD__
65 /* - rpath is required to read --extra-opts (given up later)
66 * - inet is required for sockets
67 * - unix is required for Unix domain sockets
68 * - dns is required for name lookups */
69 pledge("stdio rpath inet unix dns", NULL);
70#endif // __OpenBSD__
71
64 setlocale(LC_ALL, ""); 72 setlocale(LC_ALL, "");
65 bindtextdomain(PACKAGE, LOCALEDIR); 73 bindtextdomain(PACKAGE, LOCALEDIR);
66 textdomain(PACKAGE); 74 textdomain(PACKAGE);
@@ -74,6 +82,10 @@ int main(int argc, char **argv) {
74 usage4(_("Could not parse arguments")); 82 usage4(_("Could not parse arguments"));
75 } 83 }
76 84
85#ifdef __OpenBSD__
86 pledge("stdio inet unix dns", NULL);
87#endif // __OpenBSD__
88
77 check_ssh_config config = tmp_config.config; 89 check_ssh_config config = tmp_config.config;
78 90
79 mp_check overall = mp_check_init(); 91 mp_check overall = mp_check_init();