aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-03-01 16:04:35 +0000
committerMatthew Wild <mwild1@gmail.com>2010-03-01 16:04:35 +0000
commit82ee60ce09e0cf87de79a4e1cc6476408ae54d7f (patch)
tree7c3e54913dc92a19bf2de382a9559d2ffe358f08
parent2bf7a07f9e107956e6caa8f697c263791ac18d48 (diff)
parent2c5542977bd0a7c51d1aa3f93a5799f85a7f762d (diff)
downloadprosody-82ee60ce09e0cf87de79a4e1cc6476408ae54d7f.tar.gz
prosody-82ee60ce09e0cf87de79a4e1cc6476408ae54d7f.zip
Merge with 0.7
-rw-r--r--plugins/mod_saslauth.lua2
-rw-r--r--util/sasl_cyrus.lua1
2 files changed, 3 insertions, 0 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua
index 0f4c8b4b..0f809bd8 100644
--- a/plugins/mod_saslauth.lua
+++ b/plugins/mod_saslauth.lua
@@ -36,7 +36,9 @@ local xmlns_stanzas ='urn:ietf:params:xml:ns:xmpp-stanzas';
local new_sasl;
if sasl_backend == "cyrus" then
+ prosody.unlock_globals();
local ok, cyrus = pcall(require, "util.sasl_cyrus");
+ prosody.lock_globals();
if ok then
local cyrus_new = cyrus.new;
new_sasl = function(realm)
diff --git a/util/sasl_cyrus.lua b/util/sasl_cyrus.lua
index 57c6ba3c..980af598 100644
--- a/util/sasl_cyrus.lua
+++ b/util/sasl_cyrus.lua
@@ -87,6 +87,7 @@ end
-- select a mechanism to use
function method:select(mechanism)
self.mechanism = mechanism;
+ if not self.mechs then self:mechanisms(); end
return self.mechs[mechanism];
end