Hi,
As we discussed, here's a diff to revert back my previous commit on
eigrpd(8) and remove cpath promise entirely since if the socket is not
deleted at shutdown it won't cause any harm.
OK?
Index: control.c
===================================================================
RCS file: /cvs/src/usr.sbin/eigrpd/control.c,v
retrieving revision 1.7
diff -u -p -u -r1.7 control.c
--- control.c 8 Jan 2017 23:04:42 -0000 1.7
+++ control.c 3 Aug 2018 11:57:24 -0000
@@ -100,16 +100,6 @@ control_listen(void)
return (0);
}
-void
-control_cleanup(char *path)
-{
- if (path == NULL)
- return;
- event_del(&control_state.ev);
- event_del(&control_state.evt);
- unlink(path);
-}
-
/* ARGSUSED */
static void
control_accept(int listenfd, short event, void *bula)
Index: control.h
===================================================================
RCS file: /cvs/src/usr.sbin/eigrpd/control.h,v
retrieving revision 1.3
diff -u -p -u -r1.3 control.h
--- control.h 2 Sep 2016 16:44:33 -0000 1.3
+++ control.h 3 Aug 2018 11:57:24 -0000
@@ -36,7 +36,6 @@ struct ctl_conn {
int control_init(char *);
int control_listen(void);
-void control_cleanup(char *);
int control_imsg_relay(struct imsg *);
#endif /* _CONTROL_H_ */
Index: eigrpd.c
===================================================================
RCS file: /cvs/src/usr.sbin/eigrpd/eigrpd.c,v
retrieving revision 1.23
diff -u -p -u -r1.23 eigrpd.c
--- eigrpd.c 2 Aug 2018 06:43:31 -0000 1.23
+++ eigrpd.c 3 Aug 2018 11:57:24 -0000
@@ -168,8 +168,6 @@ main(int argc, char *argv[])
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;
@@ -271,7 +269,7 @@ main(int argc, char *argv[])
eigrpd_conf->rdomain) == -1)
fatalx("kr_init failed");
- if (pledge("stdio rpath cpath inet sendfd", NULL) == -1)
+ if (pledge("stdio rpath inet sendfd", NULL) == -1)
fatal("pledge");
event_dispatch();
@@ -293,7 +291,6 @@ eigrpd_shutdown(void)
msgbuf_clear(&iev_rde->ibuf.w);
close(iev_rde->ibuf.fd);
- control_cleanup(global.csock);
kr_shutdown();
config_clear(eigrpd_conf);