diff options
author | Kim Alvefur <zash@zash.se> | 2017-04-21 14:34:53 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-04-21 14:34:53 +0200 |
commit | 31c0689963768851472a6d2d82328a9a63725a77 (patch) | |
tree | 5f8ab45f0dd68fb3a534d9dbd7a5570f817adbcc /prosodyctl | |
parent | 1dfc20f031a3e697f9dcc74d7b63afc15e9ebc59 (diff) | |
download | prosody-31c0689963768851472a6d2d82328a9a63725a77.tar.gz prosody-31c0689963768851472a6d2d82328a9a63725a77.zip |
prosodyctl: Verify that directory certs are written to exists
Diffstat (limited to 'prosodyctl')
-rwxr-xr-x | prosodyctl | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -831,6 +831,10 @@ function commands.cert(arg) openssl = require "util.openssl"; lfs = require "lfs"; local cert_dir_attrs = lfs.attributes(cert_basedir); + if not cert_dir_attrs then + 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 show_warning("The directory "..cert_basedir.." is not owned by the current user, won't be able to write files to it"); return 1; |