summaryrefslogtreecommitdiff
path: root/usr.sbin/ripctl/ripctl.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-10-09 07:54:29 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-10-09 07:54:29 +0000
commit0bc57a2f19f0162f3beffcb0c1b974c50e8c5b9c (patch)
tree40b695430ccdd524d511d50f0fc75740c6b5dc2d /usr.sbin/ripctl/ripctl.c
parent10d2374a6c8cb93b2d4f869748f8d16d53e975f5 (diff)
All commands seem to work fine with pledge "stdio" after the connect(),
direct source and symbol table inspection suggests it is good. The same principle will likely apply to most of our network daemon *ctl programs, since many are derived from ospfd. Still, each needs testing. discussion about network daemons and ctl's has been mostly with renato
Diffstat (limited to 'usr.sbin/ripctl/ripctl.c')
-rw-r--r--usr.sbin/ripctl/ripctl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/ripctl/ripctl.c b/usr.sbin/ripctl/ripctl.c
index 93ebbc3ac49..24f5521e8a5 100644
--- a/usr.sbin/ripctl/ripctl.c
+++ b/usr.sbin/ripctl/ripctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ripctl.c,v 1.14 2015/09/27 17:32:36 stsp Exp $
+/* $OpenBSD: ripctl.c,v 1.15 2015/10/09 07:54:28 deraadt Exp $
*
* Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it>
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -88,6 +88,9 @@ main(int argc, char *argv[])
if (connect(ctl_sock, (struct sockaddr *)&sun, sizeof(sun)) == -1)
err(1, "connect: %s", RIPD_SOCKET);
+ if (pledge("stdio", NULL) == -1)
+ err(1, "pledge");
+
if ((ibuf = malloc(sizeof(struct imsgbuf))) == NULL)
err(1, NULL);
imsg_init(ibuf, ctl_sock);