summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-10-07 04:05:24 +0000
committerderaadt <deraadt@openbsd.org>2015-10-07 04:05:24 +0000
commit060ad421ba9d56b12628d80f80dbbff85b22ea67 (patch)
tree41b9ffd3a7c2df379b8e1f50631d96f3d0c508e9
parentWe continue our tour through obscure BSD <word escapes me>. This stdio-based (diff)
downloadwireguard-openbsd-060ad421ba9d56b12628d80f80dbbff85b22ea67.tar.xz
wireguard-openbsd-060ad421ba9d56b12628d80f80dbbff85b22ea67.zip
tame "stdio getpw rpath wpath tty". "tty" allows this to use
readpassphrase().
-rw-r--r--usr.bin/lock/lock.c5
1 files changed, 4 insertions, 1 deletions
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());