summaryrefslogtreecommitdiff
path: root/usr.sbin/tftpd
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-10-10 22:21:40 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-10-10 22:21:40 +0000
commit39255032ff4a0f6ea77ba504e5dd2595bbff43ce (patch)
treeef2b63dc47da267cff246f5e75066a3695116cc9 /usr.sbin/tftpd
parent122525248e3be8b4ebae157abbced233ab86a8e8 (diff)
pledge "stdio rpath wpath cpath fattr inet" after chroot and such
appears to be good enough for the main loop processing.
Diffstat (limited to 'usr.sbin/tftpd')
-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)