From 57ae68919325b77be9ad4af9b2b44fac8156f600 Mon Sep 17 00:00:00 2001 From: deraadt Date: Sat, 10 Oct 2015 17:59:15 +0000 Subject: [PATCH] pledge "stdio rpath tty". rpath for the configuration reading done by login* subsystem, tty for readpassphase() ok beck --- usr.bin/encrypt/encrypt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usr.bin/encrypt/encrypt.c b/usr.bin/encrypt/encrypt.c index 8ba2f790054..28fd4f25d35 100644 --- a/usr.bin/encrypt/encrypt.c +++ b/usr.bin/encrypt/encrypt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: encrypt.c,v 1.40 2015/02/26 17:46:15 tedu Exp $ */ +/* $OpenBSD: encrypt.c,v 1.41 2015/10/10 17:59:15 deraadt Exp $ */ /* * Copyright (c) 1996, Jason Downs. All rights reserved. @@ -93,6 +93,9 @@ 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) + err(1, "pledge"); + while ((opt = getopt(argc, argv, "pb:c:")) != -1) { switch (opt) { case 'p': -- 2.20.1