diff options
author | Kim Alvefur <zash@zash.se> | 2018-10-24 17:04:17 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-10-24 17:04:17 +0200 |
commit | 5756d8fc1abf35f7e544f46d450af212049e261a (patch) | |
tree | d4c9399ef4b955d56219a427ed86001568487448 /prosodyctl | |
parent | 2e93c4b785f8648381a3f91937bb84c12f14d6ba (diff) | |
download | prosody-5756d8fc1abf35f7e544f46d450af212049e261a.tar.gz prosody-5756d8fc1abf35f7e544f46d450af212049e261a.zip |
prosodyctl: Allow cert dir to not be owned by root (fixes #1075)
Diffstat (limited to 'prosodyctl')
-rwxr-xr-x | prosodyctl | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -944,7 +944,8 @@ function commands.cert(arg) show_warning("The directory "..cert_basedir.." does not exist"); return 1; -- TODO Should we create it? end - if pposix.getuid() ~= cert_dir_attrs.uid then + local uid = pposix.getuid(); + if uid ~= 0 and uid ~= cert_dir_attrs.uid then show_warning("The directory "..cert_basedir.." is not owned by the current user, won't be able to write files to it"); return 1; elseif not cert_dir_attrs.permissions then -- COMPAT with LuaFilesystem < 1.6.2 (hey CentOS!) |