summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2015-10-28 19:32:29 +0000
committertedu <tedu@openbsd.org>2015-10-28 19:32:29 +0000
commitb0c65617e1a9f499933d3b2bc7fcbb881fcc28ad (patch)
treef92df215125d48dd08d55bbb68f3cb1d998ff8fd
parentuse an rb tree for the cache too. modelled after the reqtree. (diff)
downloadwireguard-openbsd-b0c65617e1a9f499933d3b2bc7fcbb881fcc28ad.tar.xz
wireguard-openbsd-b0c65617e1a9f499933d3b2bc7fcbb881fcc28ad.zip
add pledge to main process, though it needs a few more options
-rw-r--r--usr.sbin/rebound/rebound.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/rebound/rebound.c b/usr.sbin/rebound/rebound.c
index 93e23a55885..b74da0513ba 100644
--- a/usr.sbin/rebound/rebound.c
+++ b/usr.sbin/rebound/rebound.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rebound.c,v 1.30 2015/10/28 19:09:58 tedu Exp $ */
+/* $OpenBSD: rebound.c,v 1.31 2015/10/28 19:32:29 tedu Exp $ */
/*
* Copyright (c) 2015 Ted Unangst <tedu@openbsd.org>
*
@@ -542,6 +542,9 @@ main(int argc, char **argv)
struct timespec ts, *timeout = NULL;
const char *conffile = "/etc/rebound.conf";
+ if (pledge("stdio inet proc id rpath", NULL) == -1)
+ logerr("pledge failed");
+
while ((ch = getopt(argc, argv, "c:d")) != -1) {
switch (ch) {
case 'c':