aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-03-23 20:11:39 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-03-23 20:11:39 +0500
commite0f77c120dbfa5a2bdd4937c23be20f311cdcabc (patch)
tree68262cd4dc773743b1c5992db7669d95ad6fb399 /plugins
parent46c0b8c7f9adeeef3e0a22204879d82230ce3d5b (diff)
downloadprosody-e0f77c120dbfa5a2bdd4937c23be20f311cdcabc.tar.gz
prosody-e0f77c120dbfa5a2bdd4937c23be20f311cdcabc.zip
mod_saslauth: Fail with an error when the requested SASL backend cannot be used.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_saslauth.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua
index f2fe44ea..d628ec30 100644
--- a/plugins/mod_saslauth.lua
+++ b/plugins/mod_saslauth.lua
@@ -46,13 +46,15 @@ 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;
+ if sasl_backend ~= "builtin" then
+ module:log("error", "Unknown SASL backend: %s", sasl_backend);
+ error("Unknown SASL backend");
+ end
new_sasl = require "util.sasl".new;
end