summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-10-10 22:21:39 +0000
committerderaadt <deraadt@openbsd.org>2015-10-10 22:21:39 +0000
commita1840542eda6944fe88e28f4b255e55f9bab258b (patch)
tree3a38c45f5bd105206c693e022697cf23b9b68950
parentpledge "stdio route"; untested. this has the if_nametoindex() problem as (diff)
downloadwireguard-openbsd-a1840542eda6944fe88e28f4b255e55f9bab258b.tar.xz
wireguard-openbsd-a1840542eda6944fe88e28f4b255e55f9bab258b.zip
pledge "stdio rpath wpath cpath fattr inet" after chroot and such
appears to be good enough for the main loop processing.
-rw-r--r--usr.sbin/tftpd/tftpd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/tftpd/tftpd.c b/usr.sbin/tftpd/tftpd.c
index b3552e3c933..8c7b518cf5a 100644
--- a/usr.sbin/tftpd/tftpd.c
+++ b/usr.sbin/tftpd/tftpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tftpd.c,v 1.30 2015/10/06 06:03:11 deraadt Exp $ */
+/* $OpenBSD: tftpd.c,v 1.31 2015/10/10 22:21:39 deraadt Exp $ */
/*
* Copyright (c) 2012 David Gwynne <dlg@uq.edu.au>
@@ -358,6 +358,9 @@ main(int argc, char *argv[])
if (!debug && daemon(1, 0) == -1)
err(1, "unable to daemonize");
+ if (pledge("stdio rpath wpath cpath fattr inet", NULL) == -1)
+ err(1, "pledge");
+
event_init();
if (rewrite != NULL)