Comparison

plugins/mod_saslauth.lua @ 3061:c9f9b3964bb9

mod_saslauth: Allow the Cyrus SASL realm to be configurable
author Matthew Wild <mwild1@gmail.com>
date Thu, 20 May 2010 11:05:43 +0100
parent 2928:e6380fcaffda
child 3062:892c49869293
comparison
equal deleted inserted replaced
3059:21f7a216d955 3061:c9f9b3964bb9
43 local ok, cyrus = pcall(require, "util.sasl_cyrus"); 43 local ok, cyrus = pcall(require, "util.sasl_cyrus");
44 prosody.lock_globals(); 44 prosody.lock_globals();
45 if ok then 45 if ok then
46 local cyrus_new = cyrus.new; 46 local cyrus_new = cyrus.new;
47 new_sasl = function(realm) 47 new_sasl = function(realm)
48 return cyrus_new(realm, module:get_option("cyrus_service_name") or "xmpp"); 48 return cyrus_new(module:get_option("cyrus_service_realm") or realm, module:get_option("cyrus_service_name") or "xmpp");
49 end 49 end
50 else 50 else
51 module:log("error", "Failed to load Cyrus SASL because: %s", cyrus); 51 module:log("error", "Failed to load Cyrus SASL because: %s", cyrus);
52 error("Failed to load Cyrus SASL"); 52 error("Failed to load Cyrus SASL");
53 end 53 end