diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2021-01-19 15:23:26 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2021-01-19 15:23:26 +0000 |
commit | 61d7d6d51349a50b819359bf7b4d061eda68e292 (patch) | |
tree | 7d798bb2d4cd77182f7b5df8ce3e4365a87f7b2a /usr.sbin/ldpd | |
parent | c366e5990cd38c1c5d294a6247af2048123f88ce (diff) |
Kill log_procnames and properly define ldpd_process.
Diffstat (limited to 'usr.sbin/ldpd')
-rw-r--r-- | usr.sbin/ldpd/lde.c | 4 | ||||
-rw-r--r-- | usr.sbin/ldpd/ldpd.c | 5 | ||||
-rw-r--r-- | usr.sbin/ldpd/ldpd.h | 9 | ||||
-rw-r--r-- | usr.sbin/ldpd/ldpe.c | 4 |
4 files changed, 9 insertions, 13 deletions
diff --git a/usr.sbin/ldpd/lde.c b/usr.sbin/ldpd/lde.c index 1bfd701a390..58f3143bbb6 100644 --- a/usr.sbin/ldpd/lde.c +++ b/usr.sbin/ldpd/lde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lde.c,v 1.74 2019/01/23 02:02:04 dlg Exp $ */ +/* $OpenBSD: lde.c,v 1.75 2021/01/19 15:23:25 claudio Exp $ */ /* * Copyright (c) 2013, 2016 Renato Westphal <renato@openbsd.org> @@ -98,7 +98,7 @@ lde(int debug, int verbose) setproctitle("label decision engine"); ldpd_process = PROC_LDE_ENGINE; - log_procname = log_procnames[PROC_LDE_ENGINE]; + log_procname = "lde"; if ((pw = getpwnam(LDPD_USER)) == NULL) fatal("getpwnam"); diff --git a/usr.sbin/ldpd/ldpd.c b/usr.sbin/ldpd/ldpd.c index b867d7961dc..e4ea5fd3f51 100644 --- a/usr.sbin/ldpd/ldpd.c +++ b/usr.sbin/ldpd/ldpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ldpd.c,v 1.65 2019/08/10 01:30:53 mestre Exp $ */ +/* $OpenBSD: ldpd.c,v 1.66 2021/01/19 15:23:25 claudio Exp $ */ /* * Copyright (c) 2013, 2016 Renato Westphal <renato@openbsd.org> @@ -63,6 +63,7 @@ static void merge_l2vpn(struct ldpd_conf *, struct l2vpn *, struct l2vpn *); static void merge_auths(struct ldpd_conf *, struct ldpd_conf *); +enum ldpd_process ldpd_process; struct ldpd_global global; struct ldpd_conf *ldpd_conf; @@ -117,7 +118,7 @@ main(int argc, char *argv[]) conffile = CONF_FILE; ldpd_process = PROC_MAIN; - log_procname = log_procnames[ldpd_process]; + log_procname = "parent"; sockname = LDPD_SOCKET; log_init(1); /* log to stderr until daemonized */ diff --git a/usr.sbin/ldpd/ldpd.h b/usr.sbin/ldpd/ldpd.h index 468161a3e87..7fe21f1412a 100644 --- a/usr.sbin/ldpd/ldpd.h +++ b/usr.sbin/ldpd/ldpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ldpd.h,v 1.90 2019/01/23 08:43:45 dlg Exp $ */ +/* $OpenBSD: ldpd.h,v 1.91 2021/01/19 15:23:25 claudio Exp $ */ /* * Copyright (c) 2013, 2016 Renato Westphal <renato@openbsd.org> @@ -363,13 +363,8 @@ enum ldpd_process { PROC_MAIN, PROC_LDP_ENGINE, PROC_LDE_ENGINE -} ldpd_process; - -static const char * const log_procnames[] = { - "parent", - "ldpe", - "lde" }; +extern enum ldpd_process ldpd_process; enum socket_type { LDP_SOCKET_DISC, diff --git a/usr.sbin/ldpd/ldpe.c b/usr.sbin/ldpd/ldpe.c index 0481fcd930f..805305401d8 100644 --- a/usr.sbin/ldpd/ldpe.c +++ b/usr.sbin/ldpd/ldpe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ldpe.c,v 1.78 2021/01/19 15:14:35 claudio Exp $ */ +/* $OpenBSD: ldpe.c,v 1.79 2021/01/19 15:23:25 claudio Exp $ */ /* * Copyright (c) 2013, 2016 Renato Westphal <renato@openbsd.org> @@ -78,7 +78,7 @@ ldpe(int debug, int verbose, char *sockname) setproctitle("ldp engine"); ldpd_process = PROC_LDP_ENGINE; - log_procname = log_procnames[ldpd_process]; + log_procname = "ldpe"; /* create ldpd control socket outside chroot */ global.csock = sockname; |