Software /
code /
prosody
Changeset
3066:5e5137057b5f
mod_saslauth: Split out cyrus SASL config options into locals, and add support for cyrus_application_name (default: 'prosody')
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 20 May 2010 11:51:55 +0100 |
parents | 3064:596303990c7c |
children | 3067:8dfa246a4413 3068:fc7c693e094a |
files | plugins/mod_saslauth.lua |
diffstat | 1 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_saslauth.lua Thu May 20 11:32:24 2010 +0100 +++ b/plugins/mod_saslauth.lua Thu May 20 11:51:55 2010 +0100 @@ -27,7 +27,12 @@ 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 @@ 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);