Software /
code /
prosody
Comparison
plugins/mod_posix.lua @ 8116:76ac8b617402
mod_posix: Use typed config API
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 22 Apr 2017 16:41:44 +0200 |
parent | 8012:e898c8fda986 |
child | 8121:a33a87f13155 |
child | 8166:bbedf564b9f9 |
comparison
equal
deleted
inserted
replaced
8115:375cf924fce1 | 8116:76ac8b617402 |
---|---|
55 | 55 |
56 -- Don't even think about it! | 56 -- Don't even think about it! |
57 if not prosody.start_time then -- server-starting | 57 if not prosody.start_time then -- server-starting |
58 local suid = module:get_option("setuid"); | 58 local suid = module:get_option("setuid"); |
59 if not suid or suid == 0 or suid == "root" then | 59 if not suid or suid == 0 or suid == "root" then |
60 if pposix.getuid() == 0 and not module:get_option("run_as_root") then | 60 if pposix.getuid() == 0 and not module:get_option_boolean("run_as_root") then |
61 module:log("error", "Danger, Will Robinson! Prosody doesn't need to be run as root, so don't do it!"); | 61 module:log("error", "Danger, Will Robinson! Prosody doesn't need to be run as root, so don't do it!"); |
62 module:log("error", "For more information on running Prosody as root, see http://prosody.im/doc/root"); | 62 module:log("error", "For more information on running Prosody as root, see http://prosody.im/doc/root"); |
63 prosody.shutdown("Refusing to run as root"); | 63 prosody.shutdown("Refusing to run as root"); |
64 end | 64 end |
65 end | 65 end |