From a6252556487847a566efae683c2069fcfbad2b5e Mon Sep 17 00:00:00 2001 From: doug Date: Sat, 10 Oct 2015 18:14:20 +0000 Subject: [PATCH] encrypt(1) also needs to pledge "wpath" for getpass(). getpass() opens /dev/tty RW so it can write the prompt. ok deraadt@ --- usr.bin/encrypt/encrypt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/encrypt/encrypt.c b/usr.bin/encrypt/encrypt.c index 28fd4f25d35..f127a2f0783 100644 --- a/usr.bin/encrypt/encrypt.c +++ b/usr.bin/encrypt/encrypt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: encrypt.c,v 1.41 2015/10/10 17:59:15 deraadt Exp $ */ +/* $OpenBSD: encrypt.c,v 1.42 2015/10/10 18:14:20 doug Exp $ */ /* * Copyright (c) 1996, Jason Downs. All rights reserved. @@ -93,7 +93,7 @@ main(int argc, char **argv) char *extra = NULL; /* Store login class or number of rounds */ const char *errstr; - if (pledge("stdio rpath tty", NULL) == -1) + if (pledge("stdio rpath wpath tty", NULL) == -1) err(1, "pledge"); while ((opt = getopt(argc, argv, "pb:c:")) != -1) { -- 2.20.1