summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-10-05 07:16:03 +0000
committerderaadt <deraadt@openbsd.org>2015-10-05 07:16:03 +0000
commit9b85ddacc78f0576f1451ee12b0e1fcae58e2313 (patch)
treee28706736a5678bfc45089b19feb3c32bb0910ce
parentSince the dawn of time, this has contained freopen() for the tty path (diff)
downloadwireguard-openbsd-9b85ddacc78f0576f1451ee12b0e1fcae58e2313.tar.xz
wireguard-openbsd-9b85ddacc78f0576f1451ee12b0e1fcae58e2313.zip
tame "stdio rpath" works fine, as long as we sidestep the demangling
process which involves fork+execve.... ok doug
-rw-r--r--usr.bin/nm/nm.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/nm/nm.c b/usr.bin/nm/nm.c
index bc02f50d758..c1b0d19f6fc 100644
--- a/usr.bin/nm/nm.c
+++ b/usr.bin/nm/nm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nm.c,v 1.47 2015/08/13 19:13:28 miod Exp $ */
+/* $OpenBSD: nm.c,v 1.48 2015/10/05 07:16:03 deraadt Exp $ */
/* $NetBSD: nm.c,v 1.7 1996/01/14 23:04:03 pk Exp $ */
/*
@@ -211,6 +211,10 @@ main(int argc, char *argv[])
posix_radix, posix_radix);
if (demangle)
pipe2cppfilt();
+
+ if (tame("stdio rpath", NULL) == -1)
+ err(1, "tame");
+
argv += optind;
argc -= optind;