summaryrefslogtreecommitdiffstats
path: root/usr.sbin/route6d
diff options
context:
space:
mode:
authorjca <jca@openbsd.org>2015-10-17 01:01:09 +0000
committerjca <jca@openbsd.org>2015-10-17 01:01:09 +0000
commit90b2ad0c1df33f5cda3a6bf23b4b5b84122c2745 (patch)
tree6303ffc2772e31e41d63f0a25f1fcaebd3df452b /usr.sbin/route6d
parentAllow a few 'get' ioctls for pledge("route"). route6d will soon use this. (diff)
downloadwireguard-openbsd-90b2ad0c1df33f5cda3a6bf23b4b5b84122c2745.tar.xz
wireguard-openbsd-90b2ad0c1df33f5cda3a6bf23b4b5b84122c2745.zip
route6d pledges to use only "stdio rpath wpath cpath inet route mcast"
ok deraadt@
Diffstat (limited to 'usr.sbin/route6d')
-rw-r--r--usr.sbin/route6d/route6d.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/route6d/route6d.c b/usr.sbin/route6d/route6d.c
index 27155d29b16..5cc70d3495d 100644
--- a/usr.sbin/route6d/route6d.c
+++ b/usr.sbin/route6d/route6d.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route6d.c,v 1.68 2015/10/16 20:43:27 jca Exp $ */
+/* $OpenBSD: route6d.c,v 1.69 2015/10/17 01:01:09 jca Exp $ */
/* $KAME: route6d.c,v 1.111 2006/10/25 06:38:13 jinmei Exp $ */
/*
@@ -346,7 +346,12 @@ main(int argc, char *argv[])
ripbuf->rip6_res1[1] = 0;
init();
+
+ if (pledge("stdio rpath wpath cpath inet route mcast", NULL) == -1)
+ err(1, "pledge");
+
ifconfig();
+
for (ifcp = ifc; ifcp; ifcp = ifcp->ifc_next) {
if (ifcp->ifc_index < 0) {
fprintf(stderr,