summaryrefslogtreecommitdiff
path: root/usr.sbin/rebound
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2015-10-28 19:32:30 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2015-10-28 19:32:30 +0000
commit6e8ab0089b8c04cc2b20fb7da62e2e05fb2ae8c1 (patch)
tree629f4c4215857900fb6a63c3a1b7e4b78f499454 /usr.sbin/rebound
parent8e7087170a870706a3dfb93d08ca0ca405005422 (diff)
add pledge to main process, though it needs a few more options
Diffstat (limited to 'usr.sbin/rebound')
-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':