summaryrefslogtreecommitdiffstats
path: root/usr.bin/tftp/main.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-10-07 14:36:07 +0000
committerderaadt <deraadt@openbsd.org>2015-10-07 14:36:07 +0000
commit251b4668f8bcf33b4f2267197c3f64c0d8ad42ac (patch)
tree141b1001d603a6506b27e678002681be8bea8eb9 /usr.bin/tftp/main.c
parenttame "stdio rpath". no uid/user resolution happening here. (diff)
downloadwireguard-openbsd-251b4668f8bcf33b4f2267197c3f64c0d8ad42ac.tar.xz
wireguard-openbsd-251b4668f8bcf33b4f2267197c3f64c0d8ad42ac.zip
tame "stdio inet rpath wpath cpath" supports all the functions of tftp.
Diffstat (limited to 'usr.bin/tftp/main.c')
-rw-r--r--usr.bin/tftp/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/tftp/main.c b/usr.bin/tftp/main.c
index 68a6d4b6f1a..152b6617524 100644
--- a/usr.bin/tftp/main.c
+++ b/usr.bin/tftp/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.35 2015/01/16 06:40:13 deraadt Exp $ */
+/* $OpenBSD: main.c,v 1.36 2015/10/07 14:36:07 deraadt Exp $ */
/* $NetBSD: main.c,v 1.6 1995/05/21 16:54:10 mycroft Exp $ */
/*
@@ -171,6 +171,9 @@ main(int argc, char *argv[])
{
f = -1;
+ if (tame("stdio inet rpath wpath cpath", NULL) == -1)
+ err(1, "tame");
+
/* set default transfer mode */
strlcpy(mode, "netascii", sizeof(mode));