diff options
author | Matthew Wild <mwild1@gmail.com> | 2010-03-24 22:41:43 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2010-03-24 22:41:43 +0000 |
commit | 3487bfbd547efbdb6021f24b517c15ba08ee84db (patch) | |
tree | 7f56b1cea38c4cc972015bb0cde0d022cd668afe /plugins/mod_saslauth.lua | |
parent | e9210ce2e777ed966cc4e80df96582e84d0d2ae8 (diff) | |
parent | 808ba7e691f4fbc36a380204ea4cce1c46d9b69b (diff) | |
download | prosody-3487bfbd547efbdb6021f24b517c15ba08ee84db.tar.gz prosody-3487bfbd547efbdb6021f24b517c15ba08ee84db.zip |
Merge 0.7->trunk
Diffstat (limited to 'plugins/mod_saslauth.lua')
-rw-r--r-- | plugins/mod_saslauth.lua | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua index f2fe44ea..c0360553 100644 --- a/plugins/mod_saslauth.lua +++ b/plugins/mod_saslauth.lua @@ -35,7 +35,9 @@ local xmlns_bind ='urn:ietf:params:xml:ns:xmpp-bind'; local xmlns_stanzas ='urn:ietf:params:xml:ns:xmpp-stanzas'; local new_sasl; -if sasl_backend == "cyrus" then +if sasl_backend == "builtin" then + new_sasl = require "util.sasl".new; +elseif sasl_backend == "cyrus" then prosody.unlock_globals(); --FIXME: Figure out why this is needed and -- why cyrussasl isn't caught by the sandbox local ok, cyrus = pcall(require, "util.sasl_cyrus"); @@ -46,14 +48,12 @@ if sasl_backend == "cyrus" then return cyrus_new(realm, module:get_option("cyrus_service_name") or "xmpp"); end else - sasl_backend = "builtin"; - module:log("warn", "Failed to load Cyrus SASL, falling back to builtin auth mechanisms"); - module:log("debug", "Failed to load Cyrus because: %s", cyrus); + module:log("error", "Failed to load Cyrus SASL because: %s", cyrus); + error("Failed to load Cyrus SASL"); end -end -if not new_sasl then - if sasl_backend ~= "builtin" then module:log("warn", "Unknown SASL backend %s", sasl_backend); end; - new_sasl = require "util.sasl".new; +else + module:log("error", "Unknown SASL backend: %s", sasl_backend); + error("Unknown SASL backend"); end local default_authentication_profile = { |