summaryrefslogtreecommitdiff
path: root/usr.bin/lam
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-10-07 04:03:58 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-10-07 04:03:58 +0000
commitbee2a2fb49b629b9c31fe9830d7c2e62e9a3eff9 (patch)
tree0d809b2ef8c382886a1b85ecba0c950e3a3e20a4 /usr.bin/lam
parent71884066e7c39ed5a5610f7ded842a8e0e522650 (diff)
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.
Diffstat (limited to 'usr.bin/lam')
-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)