aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-05-20 11:51:55 +0100
committerMatthew Wild <mwild1@gmail.com>2010-05-20 11:51:55 +0100
commit58ceb41a9495c734a9ff3fa9eece8ef6fc29ecbe (patch)
treeff8779750bd958856bf9e8fef31a19ec6455884e
parent9df44146a6b13f05b978168d1607d80841d8da2c (diff)
downloadprosody-58ceb41a9495c734a9ff3fa9eece8ef6fc29ecbe.tar.gz
prosody-58ceb41a9495c734a9ff3fa9eece8ef6fc29ecbe.zip
mod_saslauth: Split out cyrus SASL config options into locals, and add support for cyrus_application_name (default: 'prosody')
-rw-r--r--plugins/mod_saslauth.lua11
1 files changed, 10 insertions, 1 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua
index 773a44a1..9f940c37 100644
--- a/plugins/mod_saslauth.lua
+++ b/plugins/mod_saslauth.lua
@@ -27,7 +27,12 @@ local config = require "core.configmanager";
local secure_auth_only = module:get_option("c2s_require_encryption") or module:get_option("require_encryption");
local sasl_backend = module:get_option("sasl_backend") or "builtin";
+
+-- 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;
@@ -46,7 +51,11 @@ elseif sasl_backend == "cyrus" then
if ok then
local cyrus_new = cyrus.new;
new_sasl = function(realm)
- return cyrus_new(module:get_option("cyrus_service_realm") or realm, module:get_option("cyrus_service_name") or "xmpp");
+ 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);