From 543f0f34095fd3775350a028db241378f1e4dd80 Mon Sep 17 00:00:00 2001 From: doug <> Date: Sat, 17 Oct 2015 15:00:11 +0000 Subject: Exit if a pledge call fails in non-interactive mode. ok semarie@ --- src/usr.bin/openssl/pkeyparam.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/usr.bin/openssl/pkeyparam.c') diff --git a/src/usr.bin/openssl/pkeyparam.c b/src/usr.bin/openssl/pkeyparam.c index cb40fbb3ed..a8a40d2b4f 100644 --- a/src/usr.bin/openssl/pkeyparam.c +++ b/src/usr.bin/openssl/pkeyparam.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pkeyparam.c,v 1.8 2015/10/10 22:28:51 doug Exp $ */ +/* $OpenBSD: pkeyparam.c,v 1.9 2015/10/17 15:00:11 doug Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2006 */ @@ -119,8 +119,10 @@ pkeyparam_main(int argc, char **argv) int ret = 1; if (single_execution) { - if (pledge("stdio rpath wpath cpath", NULL) == -1) + if (pledge("stdio rpath wpath cpath", NULL) == -1) { perror("pledge"); + exit(1); + } } memset(&pkeyparam_config, 0, sizeof(pkeyparam_config)); -- cgit v1.2.3-55-g6feb