Software /
code /
prosody
Changeset
8094:dcda2ae4569d
prosodyctl: Don't switch user if we are root and run_as_root is enabled
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 19 Apr 2017 12:40:03 +0100 |
parents | 8092:0a1c0f1107d2 |
children | 8095:57192cf193c7 |
files | prosodyctl |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/prosodyctl Mon Apr 17 03:26:21 2017 +0200 +++ b/prosodyctl Wed Apr 19 12:40:03 2017 +0100 @@ -141,7 +141,7 @@ 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;