summaryrefslogtreecommitdiffstats
path: root/usr.sbin/eigrpctl
diff options
context:
space:
mode:
authorrenato <renato@openbsd.org>2015-10-10 05:06:00 +0000
committerrenato <renato@openbsd.org>2015-10-10 05:06:00 +0000
commitf0c6dc373520cd08ad9e68baa2a940021a48e853 (patch)
tree5beac14f0c30701a7f0ad00862f7a1927b76b79f /usr.sbin/eigrpctl
parentFix detection of interface up/down events. (diff)
downloadwireguard-openbsd-f0c6dc373520cd08ad9e68baa2a940021a48e853.tar.xz
wireguard-openbsd-f0c6dc373520cd08ad9e68baa2a940021a48e853.zip
eigrpctl pledges to use stdio and route.
ok deraadt
Diffstat (limited to 'usr.sbin/eigrpctl')
-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);