diff options
Diffstat (limited to 'plugins/check_tcp.c')
| -rw-r--r-- | plugins/check_tcp.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c index 09806373..430f1218 100644 --- a/plugins/check_tcp.c +++ b/plugins/check_tcp.c | |||
| @@ -89,6 +89,14 @@ const int DEFAULT_NNTPS_PORT = 563; | |||
| 89 | const int DEFAULT_CLAMD_PORT = 3310; | 89 | const int DEFAULT_CLAMD_PORT = 3310; |
| 90 | 90 | ||
| 91 | int main(int argc, char **argv) { | 91 | int main(int argc, char **argv) { |
| 92 | #ifdef __OpenBSD__ | ||
| 93 | /* - rpath is required to read --extra-opts (given up later) | ||
| 94 | * - inet is required for sockets | ||
| 95 | * - unix is required for Unix domain sockets | ||
| 96 | * - dns is required for name lookups */ | ||
| 97 | pledge("stdio rpath inet unix dns", NULL); | ||
| 98 | #endif // __OpenBSD__ | ||
| 99 | |||
| 92 | setlocale(LC_ALL, ""); | 100 | setlocale(LC_ALL, ""); |
| 93 | bindtextdomain(PACKAGE, LOCALEDIR); | 101 | bindtextdomain(PACKAGE, LOCALEDIR); |
| 94 | textdomain(PACKAGE); | 102 | textdomain(PACKAGE); |
| @@ -216,6 +224,10 @@ int main(int argc, char **argv) { | |||
| 216 | usage4(_("Could not parse arguments")); | 224 | usage4(_("Could not parse arguments")); |
| 217 | } | 225 | } |
| 218 | 226 | ||
| 227 | #ifdef __OpenBSD__ | ||
| 228 | pledge("stdio inet unix dns", NULL); | ||
| 229 | #endif // __OpenBSD__ | ||
| 230 | |||
| 219 | config = paw.config; | 231 | config = paw.config; |
| 220 | 232 | ||
| 221 | if (verbosity > 0) { | 233 | if (verbosity > 0) { |
