From 3f8f70a75ddf49d9e389bf4faa7fc94e2a2d03a2 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Sat, 10 Oct 2015 17:59:16 +0000 Subject: 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(-) (limited to 'usr.bin/encrypt') 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': -- cgit v1.2.3