From: deraadt Date: Sat, 10 Oct 2015 22:21:39 +0000 (+0000) Subject: pledge "stdio rpath wpath cpath fattr inet" after chroot and such X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a1840542eda6944fe88e28f4b255e55f9bab258b;p=openbsd pledge "stdio rpath wpath cpath fattr inet" after chroot and such appears to be good enough for the main loop processing. --- 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 @@ -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)