From 060ad421ba9d56b12628d80f80dbbff85b22ea67 Mon Sep 17 00:00:00 2001 From: deraadt Date: Wed, 7 Oct 2015 04:05:24 +0000 Subject: [PATCH] tame "stdio getpw rpath wpath tty". "tty" allows this to use readpassphrase(). --- usr.bin/lock/lock.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usr.bin/lock/lock.c b/usr.bin/lock/lock.c index 12276498879..b1a31dedcfc 100644 --- a/usr.bin/lock/lock.c +++ b/usr.bin/lock/lock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lock.c,v 1.28 2015/01/16 06:40:09 deraadt Exp $ */ +/* $OpenBSD: lock.c,v 1.29 2015/10/07 04:05:24 deraadt Exp $ */ /* $NetBSD: lock.c,v 1.8 1996/05/07 18:32:31 jtc Exp $ */ /* @@ -90,6 +90,9 @@ main(int argc, char *argv[]) usemine = 0; no_timeout = 0; + if (tame("stdio getpw rpath wpath tty", NULL) == -1) + err(1, "tame"); + if (!(pw = getpwuid(getuid()))) errx(1, "unknown uid %u.", getuid()); -- 2.20.1