summaryrefslogtreecommitdiff
path: root/usr.sbin/bind/bin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-11-11 02:52:47 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-11-11 02:52:47 +0000
commitfe9e8af8f3246e14a9eb585feb4d7f5aaa093855 (patch)
tree3281fbb5b5f5de11321c6825dd5a2c6d70e07068 /usr.sbin/bind/bin
parent0edf0956a8620a9cd461d3f081c92645c20c8b9e (diff)
exit() after perror() for pledge failure. Perhaps this got introduced
as a test idiom, either when pledge was young or during the transition to strings.... dunno
Diffstat (limited to 'usr.sbin/bind/bin')
-rw-r--r--usr.sbin/bind/bin/dig/dig.c8
-rw-r--r--usr.sbin/bind/bin/dig/host.c8
-rw-r--r--usr.sbin/bind/bin/dig/nslookup.c8
3 files changed, 18 insertions, 6 deletions
diff --git a/usr.sbin/bind/bin/dig/dig.c b/usr.sbin/bind/bin/dig/dig.c
index 156d1bcdb76..fbe399defee 100644
--- a/usr.sbin/bind/bin/dig/dig.c
+++ b/usr.sbin/bind/bin/dig/dig.c
@@ -1755,8 +1755,10 @@ main(int argc, char **argv) {
ISC_LIST_INIT(server_list);
ISC_LIST_INIT(search_list);
- if (pledge("stdio rpath dns", NULL) == -1)
+ if (pledge("stdio rpath dns", NULL) == -1) {
perror("pledge");
+ exit(1);
+ }
debug("main()");
preparse_args(argc, argv);
@@ -1766,8 +1768,10 @@ main(int argc, char **argv) {
setup_libs();
parse_args(ISC_FALSE, ISC_FALSE, argc, argv);
- if (pledge("stdio dns", NULL) == -1)
+ if (pledge("stdio dns", NULL) == -1) {
perror("pledge");
+ exit(1);
+ }
setup_system();
if (domainopt[0] != '\0') {
diff --git a/usr.sbin/bind/bin/dig/host.c b/usr.sbin/bind/bin/dig/host.c
index c272f6cf08c..ff41d34a112 100644
--- a/usr.sbin/bind/bin/dig/host.c
+++ b/usr.sbin/bind/bin/dig/host.c
@@ -839,8 +839,10 @@ main(int argc, char **argv) {
idnoptions = IDN_ASCCHECK;
#endif
- if (pledge("stdio rpath dns inet", NULL) == -1)
+ if (pledge("stdio rpath dns inet", NULL) == -1) {
perror("pledge");
+ exit(1);
+ }
debug("main()");
progname = argv[0];
@@ -850,8 +852,10 @@ main(int argc, char **argv) {
setup_libs();
parse_args(ISC_FALSE, argc, argv);
- if (pledge("stdio dns", NULL) == -1)
+ if (pledge("stdio dns", NULL) == -1) {
perror("pledge");
+ exit(1);
+ }
setup_system();
result = isc_app_onrun(mctx, global_task, onrun_callback, NULL);
diff --git a/usr.sbin/bind/bin/dig/nslookup.c b/usr.sbin/bind/bin/dig/nslookup.c
index d9a7085948d..e1d0ceda30e 100644
--- a/usr.sbin/bind/bin/dig/nslookup.c
+++ b/usr.sbin/bind/bin/dig/nslookup.c
@@ -867,14 +867,18 @@ main(int argc, char **argv) {
result = isc_app_start();
check_result(result, "isc_app_start");
- if (pledge("stdio rpath dns", NULL) == -1)
+ if (pledge("stdio rpath dns", NULL) == -1) {
perror("pledge");
+ exit(1);
+ }
setup_libs();
progname = argv[0];
- if (pledge("stdio dns", NULL) == -1)
+ if (pledge("stdio dns", NULL) == -1) {
perror("pledge");
+ exit(1);
+ }
parse_args(argc, argv);