diff options
author | 2015-10-10 22:21:39 +0000 | |
---|---|---|
committer | 2015-10-10 22:21:39 +0000 | |
commit | a1840542eda6944fe88e28f4b255e55f9bab258b (patch) | |
tree | 3a38c45f5bd105206c693e022697cf23b9b68950 | |
parent | pledge "stdio route"; untested. this has the if_nametoindex() problem as (diff) | |
download | wireguard-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.c | 5 |
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) |