-/* $OpenBSD: eigrpd.c,v 1.21 2016/09/02 17:59:58 benno Exp $ */
+/* $OpenBSD: eigrpd.c,v 1.22 2018/08/02 06:28:35 mestre Exp $ */
/*
* Copyright (c) 2015 Renato Westphal <renato@openbsd.org>
#include "eigrpe.h"
#include "rde.h"
#include "log.h"
+#include "control.h"
static void main_sig_handler(int, short, void *);
static __dead void usage(void);
else if (eflag)
eigrpe(debug, global.cmd_opts & EIGRPD_OPT_VERBOSE, sockname);
+ global.csock = sockname;
+
mib[0] = CTL_NET;
mib[1] = PF_INET;
mib[2] = IPPROTO_IP;
eigrpd_conf->rdomain) == -1)
fatalx("kr_init failed");
- if (pledge("inet rpath stdio sendfd", NULL) == -1)
+ if (pledge("inet rpath cpath stdio sendfd", NULL) == -1)
fatal("pledge");
event_dispatch();
msgbuf_clear(&iev_rde->ibuf.w);
close(iev_rde->ibuf.fd);
+ control_cleanup(global.csock);
kr_shutdown();
config_clear(eigrpd_conf);
-/* $OpenBSD: eigrpe.c,v 1.34 2016/09/02 17:59:58 benno Exp $ */
+/* $OpenBSD: eigrpe.c,v 1.35 2018/08/02 06:28:35 mestre Exp $ */
/*
* Copyright (c) 2015 Renato Westphal <renato@openbsd.org>
setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid))
fatal("can't drop privileges");
- if (pledge("stdio cpath inet mcast recvfd", NULL) == -1)
+ if (pledge("stdio inet mcast recvfd", NULL) == -1)
fatal("pledge");
event_init();
msgbuf_clear(&iev_main->ibuf.w);
close(iev_main->ibuf.fd);
- control_cleanup(global.csock);
config_clear(econf);
event_del(&ev4);