From: jca Date: Sun, 25 Oct 2015 21:31:58 +0000 (+0000) Subject: pledge "stdio inet route"; ok deraadt@ X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4f74de982d56fa6c1f747f9c5d1c85ac9269c43d;p=openbsd pledge "stdio inet route"; ok deraadt@ --- diff --git a/usr.sbin/rtadvd/rtadvd.c b/usr.sbin/rtadvd/rtadvd.c index 1f3e9900a62..a24f7881262 100644 --- a/usr.sbin/rtadvd/rtadvd.c +++ b/usr.sbin/rtadvd/rtadvd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtadvd.c,v 1.56 2015/10/25 21:23:42 jca Exp $ */ +/* $OpenBSD: rtadvd.c,v 1.57 2015/10/25 21:31:58 jca Exp $ */ /* $KAME: rtadvd.c,v 1.66 2002/05/29 14:18:36 itojun Exp $ */ /* @@ -238,6 +238,9 @@ main(argc, argv) setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid)) fatal("cannot drop privileges"); + if (pledge("stdio inet route", NULL) == -1) + err(1, "pledge"); + npfd = 1; pfd[0].fd = sock; pfd[0].events = POLLIN;