Software /
code /
prosody
Comparison
plugins/mod_auth_cyrus.lua @ 5000:58c9519dc461
mod_auth_cyrus, util.sasl_cyrus: Add new option 'cyrus_server_fqdn' to override the hostname passed to Cyrus (and used in e.g. GSSAPI/Kerberos) - fixes #295
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 24 Jul 2012 10:56:47 +0100 |
parent | 4160:f08f649b898b |
child | 5115:3939960b3c07 |
comparison
equal
deleted
inserted
replaced
4999:d5a3c5c1873c | 5000:58c9519dc461 |
---|---|
12 | 12 |
13 local cyrus_service_realm = module:get_option("cyrus_service_realm"); | 13 local cyrus_service_realm = module:get_option("cyrus_service_realm"); |
14 local cyrus_service_name = module:get_option("cyrus_service_name"); | 14 local cyrus_service_name = module:get_option("cyrus_service_name"); |
15 local cyrus_application_name = module:get_option("cyrus_application_name"); | 15 local cyrus_application_name = module:get_option("cyrus_application_name"); |
16 local require_provisioning = module:get_option("cyrus_require_provisioning") or false; | 16 local require_provisioning = module:get_option("cyrus_require_provisioning") or false; |
17 local host_fqdn = module:get_option("cyrus_server_fqdn"); | |
17 | 18 |
18 prosody.unlock_globals(); --FIXME: Figure out why this is needed and | 19 prosody.unlock_globals(); --FIXME: Figure out why this is needed and |
19 -- why cyrussasl isn't caught by the sandbox | 20 -- why cyrussasl isn't caught by the sandbox |
20 local cyrus_new = require "util.sasl_cyrus".new; | 21 local cyrus_new = require "util.sasl_cyrus".new; |
21 prosody.lock_globals(); | 22 prosody.lock_globals(); |
22 local new_sasl = function(realm) | 23 local new_sasl = function(realm) |
23 return cyrus_new( | 24 return cyrus_new( |
24 cyrus_service_realm or realm, | 25 cyrus_service_realm or realm, |
25 cyrus_service_name or "xmpp", | 26 cyrus_service_name or "xmpp", |
26 cyrus_application_name or "prosody" | 27 cyrus_application_name or "prosody", |
28 host_fqdn | |
27 ); | 29 ); |
28 end | 30 end |
29 | 31 |
30 do -- diagnostic | 32 do -- diagnostic |
31 local list; | 33 local list; |