From: reyk Date: Fri, 22 Jul 2016 09:31:33 +0000 (+0000) Subject: "wpath" is needed in the parent pledge when using the /dev/switch0 device. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=d790ffe78290b0a9dc48dea21176687249e856f7;p=openbsd "wpath" is needed in the parent pledge when using the /dev/switch0 device. --- diff --git a/usr.sbin/switchd/switchd.c b/usr.sbin/switchd/switchd.c index 57881cad45b..902e9793bef 100644 --- a/usr.sbin/switchd/switchd.c +++ b/usr.sbin/switchd/switchd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: switchd.c,v 1.5 2016/07/20 21:01:06 reyk Exp $ */ +/* $OpenBSD: switchd.c,v 1.6 2016/07/22 09:31:33 reyk Exp $ */ /* * Copyright (c) 2013-2016 Reyk Floeter @@ -175,11 +175,12 @@ main(int argc, char *argv[]) * pledge in the parent process: * stdio - for malloc and basic I/O including events. * rpath - for reload to open and read the configuration files. + * wpath - for accessing the /dev/switch device. * inet - for opening OpenFlow and device sockets. * dns - for resolving host in the configuration files. * sendfd - send sockets to child processes on reload. */ - if (pledge("stdio rpath inet dns proc sendfd", NULL) == -1) + if (pledge("stdio rpath wpath inet dns proc sendfd", NULL) == -1) fatal("pledge"); event_init();