Diff

prosodyctl @ 3471:482275e38224

util.pposix, prosodyctl, mod_posix: Add initgroups() function, and bump module version. prosodyctl inits groups with the groups of prosody_user. (thanks dbb)
author Matthew Wild <mwild1@gmail.com>
date Sat, 28 Aug 2010 14:31:48 +0100
parent 3339:7893055e54d1
child 3481:72d3c8029178
line wrap: on
line diff
--- a/prosodyctl	Fri Aug 27 18:33:45 2010 +0100
+++ b/prosodyctl	Sat Aug 28 14:31:48 2010 +0100
@@ -79,7 +79,7 @@
 -- 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 @@
 		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!