diff options
author | doug <> | 2015-10-17 15:00:11 +0000 |
---|---|---|
committer | doug <> | 2015-10-17 15:00:11 +0000 |
commit | 543f0f34095fd3775350a028db241378f1e4dd80 (patch) | |
tree | 9f56dde9b92f4c14124c4eab1e2457907ad59f71 /src/usr.bin/openssl/dgst.c | |
parent | 0713745868dc436c5b2e8e3b2b1951e7a897b163 (diff) | |
download | openbsd-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/dgst.c')
-rw-r--r-- | src/usr.bin/openssl/dgst.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/usr.bin/openssl/dgst.c b/src/usr.bin/openssl/dgst.c index 432f310030..a03409e212 100644 --- a/src/usr.bin/openssl/dgst.c +++ b/src/usr.bin/openssl/dgst.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dgst.c,v 1.8 2015/10/17 07:51:10 semarie Exp $ */ | 1 | /* $OpenBSD: dgst.c,v 1.9 2015/10/17 15:00:11 doug Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -124,8 +124,10 @@ dgst_main(int argc, char **argv) | |||
124 | STACK_OF(OPENSSL_STRING) * sigopts = NULL, *macopts = NULL; | 124 | STACK_OF(OPENSSL_STRING) * sigopts = NULL, *macopts = NULL; |
125 | 125 | ||
126 | if (single_execution) { | 126 | if (single_execution) { |
127 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) | 127 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) { |
128 | perror("pledge"); | 128 | perror("pledge"); |
129 | exit(1); | ||
130 | } | ||
129 | } | 131 | } |
130 | 132 | ||
131 | if ((buf = malloc(BUFSIZE)) == NULL) { | 133 | if ((buf = malloc(BUFSIZE)) == NULL) { |