summaryrefslogtreecommitdiff
path: root/usr.bin/openssl/ocsp.c
diff options
context:
space:
mode:
authorDoug Hogan <doug@cvs.openbsd.org>2015-10-17 15:00:12 +0000
committerDoug Hogan <doug@cvs.openbsd.org>2015-10-17 15:00:12 +0000
commite24c2c6c25bf32a518a71a9c39c0a4f90da4af30 (patch)
tree916e69f318571e8b1636cdecffb02c388437ceea /usr.bin/openssl/ocsp.c
parentc87479aa11e59661064e8faf6c6fe0a2664baeef (diff)
Exit if a pledge call fails in non-interactive mode.
ok semarie@
Diffstat (limited to 'usr.bin/openssl/ocsp.c')
-rw-r--r--usr.bin/openssl/ocsp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/openssl/ocsp.c b/usr.bin/openssl/ocsp.c
index c3b1b168ba7..70dddb4f098 100644
--- a/usr.bin/openssl/ocsp.c
+++ b/usr.bin/openssl/ocsp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ocsp.c,v 1.6 2015/10/10 22:28:51 doug Exp $ */
+/* $OpenBSD: ocsp.c,v 1.7 2015/10/17 15:00:11 doug Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2000.
*/
@@ -147,8 +147,10 @@ ocsp_main(int argc, char **argv)
const char *errstr = NULL;
if (single_execution) {
- if (pledge("stdio inet rpath wpath cpath", NULL) == -1)
+ if (pledge("stdio inet rpath wpath cpath", NULL) == -1) {
perror("pledge");
+ exit(1);
+ }
}
args = argv + 1;