diff options
author | 2015-11-13 16:10:23 +0000 | |
---|---|---|
committer | 2015-11-13 16:10:23 +0000 | |
commit | 9e5453f53b2687aaa0139df18e35464a7c85228f (patch) | |
tree | 9923a6d7bf351e9482b79dba236eead68fecaea4 /usr.sbin/rarpd | |
parent | Log option names in fatal() for missing option. (diff) | |
download | wireguard-openbsd-9e5453f53b2687aaa0139df18e35464a7c85228f.tar.xz wireguard-openbsd-9e5453f53b2687aaa0139df18e35464a7c85228f.zip |
pledge "stdio rpath dns" right at the start of the servicing loop.
Commiting to gather reports.
Diffstat (limited to 'usr.sbin/rarpd')
-rw-r--r-- | usr.sbin/rarpd/rarpd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/rarpd/rarpd.c b/usr.sbin/rarpd/rarpd.c index 00872a3723f..6cbff7072b1 100644 --- a/usr.sbin/rarpd/rarpd.c +++ b/usr.sbin/rarpd/rarpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rarpd.c,v 1.65 2015/10/27 11:47:17 jca Exp $ */ +/* $OpenBSD: rarpd.c,v 1.66 2015/11/13 16:10:23 deraadt Exp $ */ /* $NetBSD: rarpd.c,v 1.25 1998/04/23 02:48:33 mrg Exp $ */ /* @@ -369,6 +369,10 @@ rarp_loop(void) error(FATAL, "BIOCGBLEN: %s", strerror(errno)); /* NOTREACHED */ } + + if (pledge("stdio rpath dns", NULL) == -1) + error(FATAL, "pledge"); + buf = malloc((size_t) bufsize); if (buf == 0) { error(FATAL, "malloc: %s", strerror(errno)); |