Implemented gsasl driver for authentication.
[exim.git] / src / src / auths / cyrus_sasl.c
index 2ab028c2c543a9fef1003978746291eddeaaf02d..df7abc9281c516e913feaf05100bf5ff185bae1d 100644 (file)
@@ -1,5 +1,3 @@
-/* $Cambridge: exim/src/src/auths/cyrus_sasl.c,v 1.6 2009/11/16 19:50:38 nm4 Exp $ */
-
 /*************************************************
 *     Exim - an Internet mail transport agent    *
 *************************************************/
@@ -115,7 +113,7 @@ if(ob->server_mech == NULL)
  * authenticator of type whatever mechanism we're using
  */
 
-cbs[0].proc = &mysasl_config;
+cbs[0].proc = (int(*)(void))&mysasl_config;
 cbs[0].context = ob->server_mech;
 
 rc=sasl_server_init(cbs, "exim");
@@ -345,6 +343,21 @@ while(rc==SASL_CONTINUE)
 return 0;  /* Stop compiler complaints */
 }
 
+/*************************************************
+*                Diagnostic API                  *
+*************************************************/
+
+void
+auth_cyrus_sasl_version_report(FILE *f)
+{
+  const char *implementation, *version;
+  sasl_version_info(&implementation, &version, NULL, NULL, NULL, NULL);
+  fprintf(f, "Library version: Cyrus SASL: Compile: %d.%d.%d\n"
+             "                             Runtime: %s [%s]\n",
+          SASL_VERSION_MAJOR, SASL_VERSION_MINOR, SASL_VERSION_STEP,
+          version, implementation);
+}
+
 /*************************************************
 *              Client entry point                *
 *************************************************/