util.startup: Check root after detecting platform and reading config (thanks SigmaTel71)
authorKim Alvefur <zash@zash.se>
Sun, 24 Mar 2024 20:39:42 +0100
changeset 13466 720aed1f5cf2
parent 13465 c673ff1075bd
child 13467 3ce550ce44ce
util.startup: Check root after detecting platform and reading config (thanks SigmaTel71) Ensures that startup.detect_platform() runs so know whether to use the POSIX method of checking the current user or something else. Also after reading the config so we know whether the root override setting is set.
util/startup.lua
--- a/util/startup.lua	Sat Mar 23 20:48:19 2024 +0100
+++ b/util/startup.lua	Sun Mar 24 20:39:42 2024 +0100
@@ -861,11 +861,11 @@
 	-- These actions are in a strict order, as many depend on
 	-- previous steps to have already been performed
 	prosody.process_type = "prosody";
-	startup.check_user();
 	startup.parse_args();
 	startup.init_global_state();
 	startup.read_config();
 	startup.init_logging();
+	startup.check_user();
 	startup.init_gc();
 	startup.init_errors();
 	startup.sanity_check();