Diff

util/sasl_cyrus.lua @ 5024:d25e1b9332cc

Merge with Florob
author Matthew Wild <mwild1@gmail.com>
date Sat, 28 Jul 2012 01:14:31 +0100
parent 5000:58c9519dc461
child 5776:bd0ff8ae98a8
line wrap: on
line diff
--- a/util/sasl_cyrus.lua	Sat Jun 09 02:27:44 2012 +0200
+++ b/util/sasl_cyrus.lua	Sat Jul 28 01:14:31 2012 +0100
@@ -78,11 +78,15 @@
 end
 
 -- create a new SASL object which can be used to authenticate clients
-function new(realm, service_name, app_name)
+-- host_fqdn may be nil in which case gethostname() gives the value. 
+--      For GSSAPI, this determines the hostname in the service ticket (after
+--      reverse DNS canonicalization, only if [libdefaults] rdns = true which
+--      is the default).  
+function new(realm, service_name, app_name, host_fqdn)
 
 	init(app_name or service_name);
 
-	local st, ret = pcall(cyrussasl.server_new, service_name, nil, realm, nil, nil)
+	local st, ret = pcall(cyrussasl.server_new, service_name, host_fqdn, realm, nil, nil)
 	if not st then
 		log("error", "Creating SASL server connection failed: %s", ret);
 		return nil;