mod_saslauth: Make service_name configurable for CyrusSASL users.
authorTobias Markmann <tm@ayena.de>
Tue, 22 Dec 2009 19:20:37 +0000 (20:20 +0100)
committerTobias Markmann <tm@ayena.de>
Tue, 22 Dec 2009 19:20:37 +0000 (20:20 +0100)
plugins/mod_saslauth.lua

index 5398eae5476411c8462dfc5ecb38d5887c2a504f..19ed972f032d051fbeec1201406024880c63fee0 100644 (file)
@@ -34,10 +34,10 @@ local xmlns_bind ='urn:ietf:params:xml:ns:xmpp-bind';
 local xmlns_stanzas ='urn:ietf:params:xml:ns:xmpp-stanzas';
 
 local new_sasl
-if config.get(module:get_host(), "core", "use_cyrus") then
+if config.get(module:get_host(), "core", "cyrus_service_name") then
        cyrus_new = require "util.sasl_cyrus".new;
        new_sasl = function(realm)
-                       return cyrus_new(realm, "prosody")
+                       return cyrus_new(realm, config.get(module:get_host(), "core", "cyrus_service_name"))
                end
 else
        new_sasl = require "util.sasl".new;