diff options
Diffstat (limited to 'plugins/check_ntp_time.c')
| -rw-r--r-- | plugins/check_ntp_time.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/check_ntp_time.c b/plugins/check_ntp_time.c index 9e0beb9c..afa6d16c 100644 --- a/plugins/check_ntp_time.c +++ b/plugins/check_ntp_time.c | |||
| @@ -661,6 +661,14 @@ static check_ntp_time_config_wrapper process_arguments(int argc, char **argv) { | |||
| 661 | } | 661 | } |
| 662 | 662 | ||
| 663 | int main(int argc, char *argv[]) { | 663 | int main(int argc, char *argv[]) { |
| 664 | #ifdef __OpenBSD__ | ||
| 665 | /* - rpath is required to read --extra-opts (given up later) | ||
| 666 | * - inet is required for sockets | ||
| 667 | * - unix is required for Unix domain sockets | ||
| 668 | * - dns is required for name lookups */ | ||
| 669 | pledge("stdio rpath inet unix dns", NULL); | ||
| 670 | #endif // __OpenBSD__ | ||
| 671 | |||
| 664 | setlocale(LC_ALL, ""); | 672 | setlocale(LC_ALL, ""); |
| 665 | bindtextdomain(PACKAGE, LOCALEDIR); | 673 | bindtextdomain(PACKAGE, LOCALEDIR); |
| 666 | textdomain(PACKAGE); | 674 | textdomain(PACKAGE); |
| @@ -674,6 +682,10 @@ int main(int argc, char *argv[]) { | |||
| 674 | usage4(_("Could not parse arguments")); | 682 | usage4(_("Could not parse arguments")); |
| 675 | } | 683 | } |
| 676 | 684 | ||
| 685 | #ifdef __OpenBSD__ | ||
| 686 | pledge("stdio inet unix dns", NULL); | ||
| 687 | #endif // __OpenBSD__ | ||
| 688 | |||
| 677 | const check_ntp_time_config config = tmp_config.config; | 689 | const check_ntp_time_config config = tmp_config.config; |
| 678 | 690 | ||
| 679 | if (config.output_format_is_set) { | 691 | if (config.output_format_is_set) { |
