summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorRenato Westphal <renato@cvs.openbsd.org>2015-10-10 05:06:01 +0000
committerRenato Westphal <renato@cvs.openbsd.org>2015-10-10 05:06:01 +0000
commit5507a0c1c1c0068e08ca551694688368bb5a80cd (patch)
tree562898056c6140f5b34a477bf4ef04d138a05e2a /usr.sbin
parent855d8aa8b06305b8135d028e962ca460c0e4a93f (diff)
eigrpctl pledges to use stdio and route.
ok deraadt
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/eigrpctl/eigrpctl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/eigrpctl/eigrpctl.c b/usr.sbin/eigrpctl/eigrpctl.c
index 1810dbd1047..98f0bd2826c 100644
--- a/usr.sbin/eigrpctl/eigrpctl.c
+++ b/usr.sbin/eigrpctl/eigrpctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: eigrpctl.c,v 1.1 2015/10/02 04:31:52 renato Exp $ */
+/* $OpenBSD: eigrpctl.c,v 1.2 2015/10/10 05:06:00 renato Exp $ */
/*
* Copyright (c) 2015 Renato Westphal <renato@openbsd.org>
@@ -97,6 +97,9 @@ main(int argc, char *argv[])
if (connect(ctl_sock, (struct sockaddr *)&sun, sizeof(sun)) == -1)
err(1, "connect: %s", EIGRPD_SOCKET);
+ if (pledge("stdio route", NULL) == -1)
+ err(1, "tame");
+
if ((ibuf = malloc(sizeof(struct imsgbuf))) == NULL)
err(1, NULL);
imsg_init(ibuf, ctl_sock);