diff options
author | deraadt <> | 2015-10-07 05:21:41 +0000 |
---|---|---|
committer | deraadt <> | 2015-10-07 05:21:41 +0000 |
commit | 9543fc17a44b10fa1102d55b6e310e6d212ec1d6 (patch) | |
tree | 877b087029df18d485bb7235c2833b7823688eac /src | |
parent | 0f588856c827184ae4c6297ba72aa33a1aa75e88 (diff) | |
download | openbsd-9543fc17a44b10fa1102d55b6e310e6d212ec1d6.tar.gz openbsd-9543fc17a44b10fa1102d55b6e310e6d212ec1d6.tar.bz2 openbsd-9543fc17a44b10fa1102d55b6e310e6d212ec1d6.zip |
tame "stdio inet rpath cpath wpath proc" seems to be sufficient for
all the wading in here. "proc" is for the speed command, which fork()'s.
ok doug
Diffstat (limited to 'src')
-rw-r--r-- | src/usr.bin/openssl/openssl.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/usr.bin/openssl/openssl.c b/src/usr.bin/openssl/openssl.c index 08132e8f96..21a5aa6018 100644 --- a/src/usr.bin/openssl/openssl.c +++ b/src/usr.bin/openssl/openssl.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: openssl.c,v 1.13 2015/09/21 13:13:06 bcook Exp $ */ | 1 | /* $OpenBSD: openssl.c,v 1.14 2015/10/07 05:21:41 deraadt 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 | * |
@@ -114,6 +114,7 @@ | |||
114 | #include <stdio.h> | 114 | #include <stdio.h> |
115 | #include <string.h> | 115 | #include <string.h> |
116 | #include <stdlib.h> | 116 | #include <stdlib.h> |
117 | #include <unistd.h> | ||
117 | 118 | ||
118 | #include "apps.h" | 119 | #include "apps.h" |
119 | 120 | ||
@@ -435,6 +436,11 @@ main(int argc, char **argv) | |||
435 | arg.data = NULL; | 436 | arg.data = NULL; |
436 | arg.count = 0; | 437 | arg.count = 0; |
437 | 438 | ||
439 | if (tame("stdio inet rpath cpath wpath proc", NULL) == -1) { | ||
440 | fprintf(stderr, "openssl: tame: %s\n", strerror(errno)); | ||
441 | exit(1); | ||
442 | } | ||
443 | |||
438 | bio_err = BIO_new_fp(stderr, BIO_NOCLOSE); | 444 | bio_err = BIO_new_fp(stderr, BIO_NOCLOSE); |
439 | if (bio_err == NULL) { | 445 | if (bio_err == NULL) { |
440 | fprintf(stderr, "openssl: failed to initialise bio_err\n"); | 446 | fprintf(stderr, "openssl: failed to initialise bio_err\n"); |