#define SASL_VERSION_FULL ((SASL_VERSION_MAJOR << 16) |\
(SASL_VERSION_MINOR << 8) | SASL_VERSION_STEP)
+#if SASL_VERSION_MINOR >= 0x020119 /* 2.1.25 */
+typedef sasl_callback_ft slap_sasl_cb_ft;
+#else
+typedef int (*slap_sasl_cb_ft)();
+#endif
+
static sasl_security_properties_t sasl_secprops;
#elif defined( SLAP_BUILTIN_SASL )
/*
#ifdef HAVE_CYRUS_SASL
int rc;
static sasl_callback_t server_callbacks[] = {
- { SASL_CB_LOG, (sasl_callback_ft)&slap_sasl_log, NULL },
- { SASL_CB_GETOPT, (sasl_callback_ft)&slap_sasl_getopt, NULL },
+ { SASL_CB_LOG, (slap_sasl_cb_ft)&slap_sasl_log, NULL },
+ { SASL_CB_GETOPT, (slap_sasl_cb_ft)&slap_sasl_getopt, NULL },
{ SASL_CB_LIST_END, NULL, NULL }
};
#endif
conn->c_sasl_extra = session_callbacks;
session_callbacks[cb=0].id = SASL_CB_LOG;
- session_callbacks[cb].proc = (sasl_callback_ft)&slap_sasl_log;
+ session_callbacks[cb].proc = (slap_sasl_cb_ft)&slap_sasl_log;
session_callbacks[cb++].context = conn;
session_callbacks[cb].id = SASL_CB_PROXY_POLICY;
- session_callbacks[cb].proc = (sasl_callback_ft)&slap_sasl_authorize;
+ session_callbacks[cb].proc = (slap_sasl_cb_ft)&slap_sasl_authorize;
session_callbacks[cb++].context = conn;
session_callbacks[cb].id = SASL_CB_CANON_USER;
- session_callbacks[cb].proc = (sasl_callback_ft)&slap_sasl_canonicalize;
+ session_callbacks[cb].proc = (slap_sasl_cb_ft)&slap_sasl_canonicalize;
session_callbacks[cb++].context = conn;
session_callbacks[cb].id = SASL_CB_LIST_END;