Mercurial > prosody-hg
changeset 14206:2b13c24ba2d6
Merge 13.0->trunk
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Thu, 28 May 2026 17:26:08 +0100 |
| parents | b226d326223d (current diff) a874c3f4570a (diff) |
| children | 41fa97090264 |
| files | util/startup.lua |
| diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
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();
