summaryrefslogtreecommitdiffstats
path: root/usr.sbin/switchctl/switchctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/switchctl/switchctl.c')
-rw-r--r--usr.sbin/switchctl/switchctl.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/switchctl/switchctl.c b/usr.sbin/switchctl/switchctl.c
index 2d57e47300c..6b828a22901 100644
--- a/usr.sbin/switchctl/switchctl.c
+++ b/usr.sbin/switchctl/switchctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: switchctl.c,v 1.7 2017/01/31 05:53:08 jsg Exp $ */
+/* $OpenBSD: switchctl.c,v 1.8 2018/10/21 21:10:24 akoshibe Exp $ */
/*
* Copyright (c) 2007-2015 Reyk Floeter <reyk@openbsd.org>
@@ -122,11 +122,13 @@ main(int argc, char *argv[])
/*
* pledge in switchctl:
* stdio - for malloc and basic I/O including events.
- * dns - for parsehostport() in the device spec.
+ * rpath - for reading from the /dev/switch device.
+ * wpath - for accessing the /dev/switch device.
* inet - for handling tcp connections with OpenFlow peers.
* unix - for opening the control socket.
+ * dns - for parsehostport() in the device spec.
*/
- if (pledge("stdio dns inet unix", NULL) == -1)
+ if (pledge("stdio rpath wpath inet unix dns", NULL) == -1)
err(1, "pledge");
log_init(quiet ? 0 : 2, LOG_USER);