Comparison

plugins/mod_saslauth.lua @ 2721:cf97b85c27b5

mod_saslauth: Unlock globals while loading cyrus
author Matthew Wild <mwild1@gmail.com>
date Mon, 01 Mar 2010 16:02:59 +0000
parent 2647:0ddb3c4dc9d1
child 2724:3fcf1048a896
comparison
equal deleted inserted replaced
2718:cffb2145b0f9 2721:cf97b85c27b5
34 local xmlns_bind ='urn:ietf:params:xml:ns:xmpp-bind'; 34 local xmlns_bind ='urn:ietf:params:xml:ns:xmpp-bind';
35 local xmlns_stanzas ='urn:ietf:params:xml:ns:xmpp-stanzas'; 35 local xmlns_stanzas ='urn:ietf:params:xml:ns:xmpp-stanzas';
36 36
37 local new_sasl; 37 local new_sasl;
38 if sasl_backend == "cyrus" then 38 if sasl_backend == "cyrus" then
39 prosody.unlock_globals();
39 local ok, cyrus = pcall(require, "util.sasl_cyrus"); 40 local ok, cyrus = pcall(require, "util.sasl_cyrus");
41 prosody.lock_globals();
40 if ok then 42 if ok then
41 local cyrus_new = cyrus.new; 43 local cyrus_new = cyrus.new;
42 new_sasl = function(realm) 44 new_sasl = function(realm)
43 return cyrus_new(realm, module:get_option("cyrus_service_name") or "xmpp"); 45 return cyrus_new(realm, module:get_option("cyrus_service_name") or "xmpp");
44 end 46 end