summaryrefslogtreecommitdiff
path: root/src/usr.bin/openssl/certhash.c
diff options
context:
space:
mode:
authordoug <>2015-10-17 15:00:11 +0000
committerdoug <>2015-10-17 15:00:11 +0000
commit543f0f34095fd3775350a028db241378f1e4dd80 (patch)
tree9f56dde9b92f4c14124c4eab1e2457907ad59f71 /src/usr.bin/openssl/certhash.c
parent0713745868dc436c5b2e8e3b2b1951e7a897b163 (diff)
downloadopenbsd-543f0f34095fd3775350a028db241378f1e4dd80.tar.gz
openbsd-543f0f34095fd3775350a028db241378f1e4dd80.tar.bz2
openbsd-543f0f34095fd3775350a028db241378f1e4dd80.zip
Exit if a pledge call fails in non-interactive mode.
ok semarie@
Diffstat (limited to 'src/usr.bin/openssl/certhash.c')
-rw-r--r--src/usr.bin/openssl/certhash.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/usr.bin/openssl/certhash.c b/src/usr.bin/openssl/certhash.c
index bd0ac54ecf..70aa7b9931 100644
--- a/src/usr.bin/openssl/certhash.c
+++ b/src/usr.bin/openssl/certhash.c
@@ -650,8 +650,10 @@ certhash_main(int argc, char **argv)
650 int i, cwdfd, ret = 0; 650 int i, cwdfd, ret = 0;
651 651
652 if (single_execution) { 652 if (single_execution) {
653 if (pledge("stdio rpath wpath cpath", NULL) == -1) 653 if (pledge("stdio rpath wpath cpath", NULL) == -1) {
654 perror("pledge"); 654 perror("pledge");
655 exit(1);
656 }
655 } 657 }
656 658
657 memset(&certhash_config, 0, sizeof(certhash_config)); 659 memset(&certhash_config, 0, sizeof(certhash_config));