diff options
author | Matthew Wild <mwild1@gmail.com> | 2017-04-19 12:40:03 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2017-04-19 12:40:03 +0100 |
commit | 5ce98ecf13a81da432fd7b6fa61184ebc338347c (patch) | |
tree | 7999ce2b758b3fcd4a9f0e6ebd987a01900f2733 /prosodyctl | |
parent | 33be2cd463e8dba9a1ed85421bf39deed303da34 (diff) | |
download | prosody-5ce98ecf13a81da432fd7b6fa61184ebc338347c.tar.gz prosody-5ce98ecf13a81da432fd7b6fa61184ebc338347c.zip |
prosodyctl: Don't switch user if we are root and run_as_root is enabled
Diffstat (limited to 'prosodyctl')
-rwxr-xr-x | prosodyctl | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 then + if current_uid == 0 and config.get("*", "run_as_root") ~= true then -- We haz root! local desired_user = config.get("*", "prosody_user") or "prosody"; local desired_group = config.get("*", "prosody_group") or desired_user; |