summaryrefslogtreecommitdiffstats
path: root/usr.sbin/switchd/switchd.c
diff options
context:
space:
mode:
authorreyk <reyk@openbsd.org>2016-07-22 09:31:33 +0000
committerreyk <reyk@openbsd.org>2016-07-22 09:31:33 +0000
commitd790ffe78290b0a9dc48dea21176687249e856f7 (patch)
tree8182e4516fcc61f68fecb647e26e806d187ebee2 /usr.sbin/switchd/switchd.c
parentfix some cases where we relay_abort_http() the connection too soon. (diff)
downloadwireguard-openbsd-d790ffe78290b0a9dc48dea21176687249e856f7.tar.xz
wireguard-openbsd-d790ffe78290b0a9dc48dea21176687249e856f7.zip
"wpath" is needed in the parent pledge when using the /dev/switch0 device.
Diffstat (limited to 'usr.sbin/switchd/switchd.c')
-rw-r--r--usr.sbin/switchd/switchd.c5
1 files changed, 3 insertions, 2 deletions
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 <reyk@openbsd.org>
@@ -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();