# HG changeset patch # User Kim Alvefur # Date 1395771512 -3600 # Node ID f8df0a9965755ac95a6d2febff89d4825dbc21cd # Parent c0ee152400ff8ea9c6f9c580a24110cb2f121548# Parent b3ceb7627e27aba484b3887d36e7a0c3007b4b1c Merge 0.10->trunk diff -r c0ee152400ff -r f8df0a996575 core/modulemanager.lua --- a/core/modulemanager.lua Sun Mar 09 23:48:32 2014 +0100 +++ b/core/modulemanager.lua Tue Mar 25 19:18:32 2014 +0100 @@ -30,7 +30,7 @@ end local autoload_modules = {prosody.platform, "presence", "message", "iq", "offline", "c2s", "s2s"}; -local component_inheritable_modules = {"tls", "dialback", "iq", "s2s"}; +local component_inheritable_modules = {"tls", "saslauth", "dialback", "iq", "s2s"}; -- We need this to let modules access the real global namespace local _G = _G; diff -r c0ee152400ff -r f8df0a996575 plugins/mod_saslauth.lua --- a/plugins/mod_saslauth.lua Sun Mar 09 23:48:32 2014 +0100 +++ b/plugins/mod_saslauth.lua Tue Mar 25 19:18:32 2014 +0100 @@ -197,7 +197,7 @@ return s2s_external_auth(session, stanza) end - if session.type ~= "c2s_unauthed" then return; end + if session.type ~= "c2s_unauthed" or module:get_host_type() ~= "local" then return; end if session.sasl_handler and session.sasl_handler.selected then session.sasl_handler = nil; -- allow starting a new SASL negotiation before completing an old one diff -r c0ee152400ff -r f8df0a996575 prosody.cfg.lua.dist --- a/prosody.cfg.lua.dist Sun Mar 09 23:48:32 2014 +0100 +++ b/prosody.cfg.lua.dist Tue Mar 25 19:18:32 2014 +0100 @@ -63,7 +63,6 @@ --"http_files"; -- Serve static files from a directory over HTTP -- Other specific functionality - --"posix"; -- POSIX functionality, sends server to background, enables syslog, etc. --"groups"; -- Shared roster support --"announce"; -- Send announcement to all online users --"welcome"; -- Welcome users who register accounts @@ -78,6 +77,7 @@ -- "offline"; -- Store offline messages -- "c2s"; -- Handle client connections -- "s2s"; -- Handle server-to-server connections + -- "posix"; -- POSIX functionality, sends server to background, enables syslog, etc. } -- Disable account creation by default, for security diff -r c0ee152400ff -r f8df0a996575 prosodyctl --- a/prosodyctl Sun Mar 09 23:48:32 2014 +0100 +++ b/prosodyctl Tue Mar 25 19:18:32 2014 +0100 @@ -687,7 +687,12 @@ conf.distinguished_name[k] = nv ~= "." and nv or nil; end end - local conf_file = io.open(conf_filename, "w"); + local conf_file, err = io.open(conf_filename, "w"); + if not conf_file then + show_warning("Could not open OpenSSL config file for writing"); + show_warning(err); + os.exit(1); + end conf_file:write(conf:serialize()); conf_file:close(); print(""); diff -r c0ee152400ff -r f8df0a996575 util/sasl.lua --- a/util/sasl.lua Sun Mar 09 23:48:32 2014 +0100 +++ b/util/sasl.lua Tue Mar 25 19:18:32 2014 +0100 @@ -100,14 +100,16 @@ function method:mechanisms() local current_mechs = {}; for mech, _ in pairs(self.mechs) do - if mechanism_channelbindings[mech] and self.profile.cb then - local ok = false; - for cb_name, _ in pairs(self.profile.cb) do - if mechanism_channelbindings[mech][cb_name] then - ok = true; + if mechanism_channelbindings[mech] then + if self.profile.cb then + local ok = false; + for cb_name, _ in pairs(self.profile.cb) do + if mechanism_channelbindings[mech][cb_name] then + ok = true; + end end + if ok == true then current_mechs[mech] = true; end end - if ok == true then current_mechs[mech] = true; end else current_mechs[mech] = true; end