aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-04-19 19:31:46 +0200
committerKim Alvefur <zash@zash.se>2017-04-19 19:31:46 +0200
commit358ede93a7e8acea77b84d2d6434fe7300aba448 (patch)
tree492d15ec0734be794de9f2a5aeb5759133babb14
parent84ac4b6752c50fbbfb198a5fd83194839a52989c (diff)
downloadprosody-358ede93a7e8acea77b84d2d6434fe7300aba448.tar.gz
prosody-358ede93a7e8acea77b84d2d6434fe7300aba448.zip
prosodyctl: Allow continuing to run as root (fixes #893)
-rwxr-xr-xprosodyctl2
1 files changed, 1 insertions, 1 deletions
diff --git a/prosodyctl b/prosodyctl
index c8accd82..90e59991 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -141,7 +141,7 @@ local ok, pposix = pcall(require, "util.pposix");
if ok and pposix then
if pposix._VERSION ~= want_pposix_version then print(string.format("Unknown version (%s) of binary pposix module, expected %s", tostring(pposix._VERSION), want_pposix_version)); return; end
current_uid = pposix.getuid();
- if current_uid == 0 and config.get("*", "run_as_root") ~= true then
+ if current_uid == 0 and config.get("*", "run_as_root") ~= true and arg[1] ~= "--root" then
-- We haz root!
local desired_user = config.get("*", "prosody_user") or "prosody";
local desired_group = config.get("*", "prosody_group") or desired_user;