equal
deleted
inserted
replaced
76 end |
76 end |
77 end |
77 end |
78 end |
78 end |
79 |
79 |
80 -- create a new SASL object which can be used to authenticate clients |
80 -- create a new SASL object which can be used to authenticate clients |
81 function new(realm, service_name, app_name) |
81 -- host_fqdn may be nil in which case gethostname() gives the value. |
|
82 -- For GSSAPI, this determines the hostname in the service ticket (after |
|
83 -- reverse DNS canonicalization, only if [libdefaults] rdns = true which |
|
84 -- is the default). |
|
85 function new(realm, service_name, app_name, host_fqdn) |
82 |
86 |
83 init(app_name or service_name); |
87 init(app_name or service_name); |
84 |
88 |
85 local st, ret = pcall(cyrussasl.server_new, service_name, nil, realm, nil, nil) |
89 local st, ret = pcall(cyrussasl.server_new, service_name, host_fqdn, realm, nil, nil) |
86 if not st then |
90 if not st then |
87 log("error", "Creating SASL server connection failed: %s", ret); |
91 log("error", "Creating SASL server connection failed: %s", ret); |
88 return nil; |
92 return nil; |
89 end |
93 end |
90 |
94 |