commit 754ba47cc4f4d3e9d709056577b74077b47d1d8a
parent 8d3f73bc719f18ac07bd22e5612b169c5dda83f2
Author: Joris Vink <joris@coders.se>
Date: Mon, 13 Aug 2018 13:07:32 +0200
shuffle stuff around so we're not hitting bad juju.
Diffstat:
2 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/src/keymgr.c b/src/keymgr.c
@@ -91,6 +91,15 @@ kore_keymgr_run(void)
kore_listener_cleanup();
kore_module_cleanup();
+
+ net_init();
+ kore_connection_init();
+ kore_platform_event_init();
+ kore_msg_worker_init();
+ kore_msg_register(KORE_MSG_KEYMGR_REQ, keymgr_msg_recv);
+ kore_msg_register(KORE_MSG_ENTROPY_REQ, keymgr_entropy_request);
+ kore_msg_register(KORE_MSG_CERTIFICATE_REQ, keymgr_certificate_request);
+
kore_worker_privdrop(keymgr_runas_user, keymgr_root_path);
if (rand_file != NULL) {
@@ -102,17 +111,7 @@ kore_keymgr_run(void)
initialized = 1;
- net_init();
- kore_connection_init();
- kore_platform_event_init();
-
- kore_msg_worker_init();
- kore_msg_register(KORE_MSG_KEYMGR_REQ, keymgr_msg_recv);
- kore_msg_register(KORE_MSG_ENTROPY_REQ, keymgr_entropy_request);
- kore_msg_register(KORE_MSG_CERTIFICATE_REQ, keymgr_certificate_request);
-
keymgr_reload();
-
RAND_poll();
last_seed = 0;
diff --git a/src/worker.c b/src/worker.c
@@ -322,12 +322,13 @@ kore_worker_entry(struct kore_worker *kw)
exit(0);
}
#endif
+ net_init();
+ kore_connection_init();
kore_platform_event_init();
kore_msg_worker_init();
kore_worker_privdrop(kore_runas_user, kore_root_path);
- net_init();
#if !defined(KORE_NO_HTTP)
http_init();
kore_filemap_resolve_paths();
@@ -335,7 +336,6 @@ kore_worker_entry(struct kore_worker *kw)
#endif
kore_timer_init();
kore_fileref_init();
- kore_connection_init();
kore_domain_load_crl();
kore_domain_keymgr_init();