-/* $OpenBSD: ldpctl.c,v 1.23 2015/09/27 17:30:38 stsp Exp $
+/* $OpenBSD: ldpctl.c,v 1.24 2015/10/23 10:11:20 renato Exp $
*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
if (connect(ctl_sock, (struct sockaddr *)&sun, sizeof(sun)) == -1)
err(1, "connect: %s", LDPD_SOCKET);
+ if (pledge("stdio", NULL) == -1)
+ err(1, "pledge");
+
if ((ibuf = malloc(sizeof(struct imsgbuf))) == NULL)
err(1, NULL);
imsg_init(ibuf, ctl_sock);