aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_saslauth.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-08-23 16:22:58 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-08-23 16:22:58 +0500
commitf17ecb66bc96463cc370c12933e5ce9066d80164 (patch)
treedafc9170ab63b3f43f96faaa45565277d37a0a97 /plugins/mod_saslauth.lua
parent049201aefbdb1faf28eb4c345b4d2af42b77daa6 (diff)
downloadprosody-f17ecb66bc96463cc370c12933e5ce9066d80164.tar.gz
prosody-f17ecb66bc96463cc370c12933e5ce9066d80164.zip
mod_saslauth: Get rid of most Cyrus SASL related code (use authentication='cyrus' instead).
Diffstat (limited to 'plugins/mod_saslauth.lua')
-rw-r--r--plugins/mod_saslauth.lua27
1 files changed, 2 insertions, 25 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua
index a6f92024..ccdfde76 100644
--- a/plugins/mod_saslauth.lua
+++ b/plugins/mod_saslauth.lua
@@ -26,9 +26,6 @@ local allow_unencrypted_plain_auth = module:get_option("allow_unencrypted_plain_
-- Cyrus config options
local require_provisioning = module:get_option("cyrus_require_provisioning") or false;
-local cyrus_service_realm = module:get_option("cyrus_service_realm");
-local cyrus_service_name = module:get_option("cyrus_service_name");
-local cyrus_application_name = module:get_option("cyrus_application_name");
local log = module._log;
@@ -36,28 +33,8 @@ local xmlns_sasl ='urn:ietf:params:xml:ns:xmpp-sasl';
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 == "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");
- prosody.lock_globals();
- if ok then
- local cyrus_new = cyrus.new;
- new_sasl = function(realm)
- return cyrus_new(
- cyrus_service_realm or realm,
- cyrus_service_name or "xmpp",
- cyrus_application_name or "prosody"
- );
- end
- else
- module:log("error", "Failed to load Cyrus SASL because: %s", cyrus);
- error("Failed to load Cyrus SASL");
- end
-else
+local new_sasl = require "util.sasl".new;
+if sasl_backend ~= "builtin" then
module:log("error", "Unknown SASL backend: %s", sasl_backend);
error("Unknown SASL backend");
end