Merge 0.10->trunk
authorKim Alvefur <zash@zash.se>
Fri, 01 Dec 2017 04:54:23 +0100
changeset 8443 4e6710b4f873
parent 8442 293dbb08427b (current diff)
parent 8424 3d21c63ec03f (diff)
child 8444 e6e69be59233
Merge 0.10->trunk
net/dns.lua
prosodyctl
--- a/net/dns.lua	Fri Dec 01 03:13:52 2017 +0100
+++ b/net/dns.lua	Fri Dec 01 04:54:23 2017 +0100
@@ -397,7 +397,7 @@
 	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
--- a/prosodyctl	Fri Dec 01 03:13:52 2017 +0100
+++ b/prosodyctl	Fri Dec 01 04:54:23 2017 +0100
@@ -945,6 +945,9 @@
 		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;
--- a/util-src/signal.c	Fri Dec 01 03:13:52 2017 +0100
+++ b/util-src/signal.c	Fri Dec 01 04:54:23 2017 +0100
@@ -172,7 +172,7 @@
 	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 @@
 	}
 
 	if(nsig < MAX_PENDING_SIGNALS) {
-		signals[++nsig] = sig;
+		signals[nsig++] = sig;
 	}
 }