From d889ec00319e1058b1942f5ebf681b0e1a7104cd Mon Sep 17 00:00:00 2001 From: deraadt Date: Wed, 7 Oct 2015 14:13:23 +0000 Subject: [PATCH] tame "stdio rpath", for the open with O_RDONLY. ok semarie --- usr.bin/look/look.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usr.bin/look/look.c b/usr.bin/look/look.c index b3b7db9b7e3..86c66fee630 100644 --- a/usr.bin/look/look.c +++ b/usr.bin/look/look.c @@ -1,4 +1,4 @@ -/* $OpenBSD: look.c,v 1.16 2015/02/06 23:21:59 millert Exp $ */ +/* $OpenBSD: look.c,v 1.17 2015/10/07 14:13:23 deraadt Exp $ */ /* $NetBSD: look.c,v 1.7 1995/08/31 22:41:02 jtc Exp $ */ /*- @@ -88,6 +88,9 @@ main(int argc, char *argv[]) int ch, fd, termchar; char *back, *file, *front, *string, *p; + if (tame("stdio rpath", NULL) == -1) + err(1, "tame"); + file = _PATH_WORDS; termchar = '\0'; while ((ch = getopt(argc, argv, "dft:")) != -1) -- 2.20.1