summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-10-07 04:03:57 +0000
committerderaadt <deraadt@openbsd.org>2015-10-07 04:03:57 +0000
commit6cfa7bda3af08bb75bd2821541765b5ceaf9cbf9 (patch)
treeb9bc1e5ed8a3240bfd1cc7cd619eb19a84e9c66f
parenttame "stdio rpath" at the start, then potentially some files are opened. (diff)
downloadwireguard-openbsd-6cfa7bda3af08bb75bd2821541765b5ceaf9cbf9.tar.xz
wireguard-openbsd-6cfa7bda3af08bb75bd2821541765b5ceaf9cbf9.zip
We continue our tour through obscure BSD <word escapes me>. This stdio-based
program may open files arbitrarily, so tame "stdio rpath" it from the start.
-rw-r--r--usr.bin/lam/lam.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/lam/lam.c b/usr.bin/lam/lam.c
index bade6206216..1f10025d6d3 100644
--- a/usr.bin/lam/lam.c
+++ b/usr.bin/lam/lam.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lam.c,v 1.17 2015/01/16 06:40:09 deraadt Exp $ */
+/* $OpenBSD: lam.c,v 1.18 2015/10/07 04:03:57 deraadt Exp $ */
/* $NetBSD: lam.c,v 1.2 1994/11/14 20:27:42 jtc Exp $ */
/*-
@@ -71,6 +71,9 @@ main(int argc, char *argv[])
{
int i;
+ if (tame("stdio rpath", NULL) == -1)
+ err(1, "tame");
+
/* Process arguments, set numfiles to file argument count. */
getargs(argc, argv);
if (numfiles == 0)