summaryrefslogtreecommitdiff
path: root/usr.bin/openssl/openssl.c
diff options
context:
space:
mode:
authorSebastien Marie <semarie@cvs.openbsd.org>2015-10-17 07:51:11 +0000
committerSebastien Marie <semarie@cvs.openbsd.org>2015-10-17 07:51:11 +0000
commit22d77a6f56a5311ba39f628534957708f5f4344d (patch)
treef5502f6130e29d350d44830073cce2ae87535278 /usr.bin/openssl/openssl.c
parenta0911b4bb1dfb68ba72046fe045f724a77d415a2 (diff)
add "tty" for several subcommands of openssl
it is needed in order to let libssl UI_* function plays with echo on/off when asking for password on terminal. passwd subcommand needs additionnal "wpath cpath" in order to let it calls fopen("/dev/tty", "w") (O_WRONLY with O_CREAT | O_TRUNC). problem reported by several with and ok doug@
Diffstat (limited to 'usr.bin/openssl/openssl.c')
-rw-r--r--usr.bin/openssl/openssl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/openssl/openssl.c b/usr.bin/openssl/openssl.c
index 43f0e9189c3..374bcd27d0a 100644
--- a/usr.bin/openssl/openssl.c
+++ b/usr.bin/openssl/openssl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: openssl.c,v 1.18 2015/10/16 13:37:44 millert Exp $ */
+/* $OpenBSD: openssl.c,v 1.19 2015/10/17 07:51:10 semarie Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -438,7 +438,7 @@ main(int argc, char **argv)
arg.data = NULL;
arg.count = 0;
- if (pledge("stdio inet rpath wpath cpath proc flock", NULL) == -1) {
+ if (pledge("stdio inet rpath wpath cpath proc flock tty", NULL) == -1) {
fprintf(stderr, "openssl: pledge: %s\n", strerror(errno));
exit(1);
}