diff options
| author | 2015-11-11 02:52:46 +0000 | |
|---|---|---|
| committer | 2015-11-11 02:52:46 +0000 | |
| commit | 9b32031c48e1ad900fa787ce2c5170e5d734e355 (patch) | |
| tree | 1e492a87268013d2ed10fb21d56c3825e60c6370 /usr.sbin/bind/bin/dig/dig.c | |
| parent | mark ehci_intr() as IPL_MPSAFE here as well (diff) | |
| download | wireguard-openbsd-9b32031c48e1ad900fa787ce2c5170e5d734e355.tar.xz wireguard-openbsd-9b32031c48e1ad900fa787ce2c5170e5d734e355.zip | |
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/dig/dig.c')
| -rw-r--r-- | usr.sbin/bind/bin/dig/dig.c | 8 |
1 files changed, 6 insertions, 2 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') { |
