Mercurial > prosody-hg
diff util/startup.lua @ 14206:2b13c24ba2d6
Merge 13.0->trunk
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Thu, 28 May 2026 17:26:08 +0100 |
| parents | c1469296190d a874c3f4570a |
| children |
line wrap: on
line diff
--- 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();
