aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-12-01 04:54:23 +0100
committerKim Alvefur <zash@zash.se>2017-12-01 04:54:23 +0100
commitf31e73eb4857a08a82825a19e65a765d2848491b (patch)
treed52e9b6b8097ddc42cc9ae912b982a51195a6384
parent6d29dae97fd196145d982813aaa7a94b615a982c (diff)
parent066b90ccffc05ecc98df624c7b8a1a97ae526dc9 (diff)
downloadprosody-f31e73eb4857a08a82825a19e65a765d2848491b.tar.gz
prosody-f31e73eb4857a08a82825a19e65a765d2848491b.zip
Merge 0.10->trunk
-rw-r--r--net/dns.lua2
-rwxr-xr-xprosodyctl3
-rw-r--r--util-src/signal.c4
3 files changed, 6 insertions, 3 deletions
diff --git a/net/dns.lua b/net/dns.lua
index fa570af1..e6749025 100644
--- a/net/dns.lua
+++ b/net/dns.lua
@@ -397,7 +397,7 @@ function resolver:AAAA(rr)
end
addr = table.concat(addr, ":"):gsub("%f[%x]0+(%x)","%1");
local zeros = {};
- for item in addr:gmatch(":[0:]+:") do
+ for item in addr:gmatch(":[0:]+:[0:]+:") do
table.insert(zeros, item)
end
if #zeros == 0 then
diff --git a/prosodyctl b/prosodyctl
index 02237082..947316a6 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -945,6 +945,9 @@ function commands.cert(arg)
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;
+ elseif not cert_dir_attrs.permissions then -- COMPAT with LuaFilesystem < 1.6.2 (hey CentOS!)
+ show_message("Unable to check permissions on "..cert_basedir.." (LuaFilesystem 1.6.2+ required)");
+ show_message("Please confirm that Prosody (and only Prosody) can write to this directory)");
elseif cert_dir_attrs.permissions:match("^%.w..%-..%-.$") then
show_warning("The directory "..cert_basedir.." not only writable by its owner");
return 1;
diff --git a/util-src/signal.c b/util-src/signal.c
index b94beffa..9e6f6f63 100644
--- a/util-src/signal.c
+++ b/util-src/signal.c
@@ -172,7 +172,7 @@ static void sighook(lua_State *L, lua_Debug *ar) {
lua_pushstring(L, LUA_SIGNAL);
lua_gettable(L, LUA_REGISTRYINDEX);
- for(int i = 1; i <= nsig; i--) {
+ for(int i = 0; i < nsig; i++) {
lua_pushnumber(L, signals[i]);
lua_gettable(L, -2);
lua_call(L, 0, 0);
@@ -196,7 +196,7 @@ static void handle(int sig) {
}
if(nsig < MAX_PENDING_SIGNALS) {
- signals[++nsig] = sig;
+ signals[nsig++] = sig;
}
}