# HG changeset patch # User Matthew Wild # Date 1779985568 -3600 # Node ID 2b13c24ba2d6057bba5ff84d09056cf5e199e8f1 # Parent b226d326223d09a7ae75551e93cd13d2d82503f6# Parent a874c3f4570a61db47d7952f33d1ede24de47c26 Merge 13.0->trunk diff -r b226d326223d -r 2b13c24ba2d6 util/startup.lua --- a/util/startup.lua Thu May 28 12:35:37 2026 +0100 +++ b/util/startup.lua Thu May 28 17:26:08 2026 +0100 @@ -642,8 +642,6 @@ end end - -- Set our umask to protect data files - pposix.umask(config.get("*", "umask") or "027"); pposix.setenv("HOME", prosody.paths.data); pposix.setenv("PROSODY_CONFIG", prosody.config_file); else @@ -733,9 +731,9 @@ end end -function startup.posix_umask() +function startup.set_umask() if prosody.platform ~= "posix" then return end - local pposix = require "prosody.util.pposix"; + local pposix = check_posix(); local umask = config.get("*", "umask") or "027"; pposix.umask(umask); end @@ -944,6 +942,7 @@ startup.chdir(); startup.read_version(); startup.switch_user(); + startup.set_umask(); startup.check_dependencies(); startup.log_startup_warnings(); startup.check_unwriteable(); @@ -972,6 +971,7 @@ startup.setup_plugin_install_path(); startup.setup_datadir(); startup.chdir(); + startup.set_umask(); startup.add_global_prosody_functions(); startup.read_version(); startup.log_greeting();