aboutsummaryrefslogtreecommitdiffstats
path: root/prosodyctl
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-01-10 22:14:44 +0000
committerMatthew Wild <mwild1@gmail.com>2010-01-10 22:14:44 +0000
commit1e1d8f62acbbb178d5ad272c6d60541e3cabfc65 (patch)
treecb34c35c7b0940226c7eef5bdacf65f7ac2b3dee /prosodyctl
parent4558719f38c410d298d3b297f276ec4bf878a211 (diff)
downloadprosody-1e1d8f62acbbb178d5ad272c6d60541e3cabfc65.tar.gz
prosody-1e1d8f62acbbb178d5ad272c6d60541e3cabfc65.zip
prosodyctl: Set umask to protect data files, bump pposix dep to 0.3.2
Diffstat (limited to 'prosodyctl')
-rwxr-xr-xprosodyctl5
1 files changed, 4 insertions, 1 deletions
diff --git a/prosodyctl b/prosodyctl
index e095ba39..fd9bbe2f 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -66,7 +66,7 @@ require "util.datamanager".set_data_path(data_path);
-- Switch away from root and into the prosody user --
local switched_user, current_uid;
-local want_pposix_version = "0.3.1";
+local want_pposix_version = "0.3.2";
local ok, pposix = pcall(require, "util.pposix");
if ok and pposix then
@@ -89,6 +89,9 @@ if ok and pposix then
print("Warning: Couldn't switch to Prosody user/group '"..tostring(desired_user).."'/'"..tostring(desired_group).."': "..tostring(err));
end
end
+
+ -- Set our umask to protect data files
+ pposix.umask(config.get("*", "core", "umask") or "027");
else
print("Error: Unable to load pposix module. Check that Prosody is installed correctly.")
print("For more help send the below error to us through http://prosody.im/discuss");