aboutsummaryrefslogtreecommitdiffstats
path: root/prosodyctl
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-08-28 14:31:48 +0100
committerMatthew Wild <mwild1@gmail.com>2010-08-28 14:31:48 +0100
commitb465aa90b9329425ed4cf79895f86c320e9af11a (patch)
treee2bf8f4855681272acea80a2b32645462de20a09 /prosodyctl
parente724cea3952f3101b818f4d94d3584d237c74b78 (diff)
downloadprosody-b465aa90b9329425ed4cf79895f86c320e9af11a.tar.gz
prosody-b465aa90b9329425ed4cf79895f86c320e9af11a.zip
util.pposix, prosodyctl, mod_posix: Add initgroups() function, and bump module version. prosodyctl inits groups with the groups of prosody_user. (thanks dbb)
Diffstat (limited to 'prosodyctl')
-rwxr-xr-xprosodyctl5
1 files changed, 4 insertions, 1 deletions
diff --git a/prosodyctl b/prosodyctl
index 9bb8d4ad..9af36ad9 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -79,7 +79,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.3";
+local want_pposix_version = "0.3.4";
local ok, pposix = pcall(require, "util.pposix");
if ok and pposix then
@@ -91,6 +91,9 @@ if ok and pposix then
local desired_group = config.get("*", "core", "prosody_group") or desired_user;
local ok, err = pposix.setgid(desired_group);
if ok then
+ ok, err = pposix.initgroups(desired_user);
+ end
+ if ok then
ok, err = pposix.setuid(desired_user);
if ok then
-- Yay!