summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremie Courreges-Anglas <jca@cvs.openbsd.org>2015-10-17 01:01:10 +0000
committerJeremie Courreges-Anglas <jca@cvs.openbsd.org>2015-10-17 01:01:10 +0000
commitbe95bf53491d0ea8de2513b8257d3b5b9072fbec (patch)
treecdd4591f3929dcf43b27ec59f70e56f4377a084a
parent53b97b53cf38ca6fe1dcc26115f91ee702ef8e44 (diff)
route6d pledges to use only "stdio rpath wpath cpath inet route mcast"
ok deraadt@
-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,