This is almost identical to the eigrpd(8) pledge diff, with the exception
that the parent process can not be pledged bacause of a SIOCSETMPWCFG
ioctl used to configure pseudowires.
Looks good to deraadt@.
-/* $OpenBSD: lde.c,v 1.38 2015/07/21 04:52:29 renato Exp $ */
+/* $OpenBSD: lde.c,v 1.39 2015/10/23 10:10:17 renato Exp $ */
/*
* Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org>
setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid))
fatal("can't drop privileges");
+ if (pledge("stdio", NULL) == -1)
+ fatal("pledge");
+
event_init();
/* setup signal handler */
-/* $OpenBSD: ldpe.c,v 1.39 2015/07/21 05:04:12 renato Exp $ */
+/* $OpenBSD: ldpe.c,v 1.40 2015/10/23 10:10:17 renato Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
LIST_FOREACH(tnbr, &leconf->tnbr_list, entry)
tnbr_init(xconf, tnbr);
+ if (pledge("stdio cpath inet mcast", NULL) == -1)
+ fatal("pledge");
+
event_dispatch();
ldpe_shutdown();