aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-01-10 22:15:15 +0000
committerMatthew Wild <mwild1@gmail.com>2010-01-10 22:15:15 +0000
commitdf44b24491dbe81bcdeb3c161bbb2f44f3bb0439 (patch)
treeb6de5b71910530e672f9881ae7c8c7a860680aad /plugins
parent1e1d8f62acbbb178d5ad272c6d60541e3cabfc65 (diff)
downloadprosody-df44b24491dbe81bcdeb3c161bbb2f44f3bb0439.tar.gz
prosody-df44b24491dbe81bcdeb3c161bbb2f44f3bb0439.zip
mod_posix: Set umask to 'umask' from the config, or 027
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_posix.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/mod_posix.lua b/plugins/mod_posix.lua
index 0f28041c..8c2c7d7d 100644
--- a/plugins/mod_posix.lua
+++ b/plugins/mod_posix.lua
@@ -23,6 +23,9 @@ local prosody = _G.prosody;
module.host = "*"; -- we're a global module
+local umask = module:get_option("umask") or "027";
+pposix.umask(umask);
+
-- Allow switching away from root, some people like strange ports.
module:add_event_hook("server-started", function ()
local uid = module:get_option("setuid");