/* Define if your GSSAPI library supports handling SPNEGO tokens */
#undef GSSAPI_SUPPORTS_SPNEGO
+
+/* Define if your krb supports krb5_cc_new_unique function to deal with threading issues */
+#undef HAVE_KRB5_CC_NEW_UNIQUE
+
} else
keytab = ap_req_keytab;
+#ifdef HAVE_KRB5_CC_NEW_UNIQUE
+ ret = krb5_cc_new_unique(context, "MEMORY", NULL, &local_ccache);
+#else
ret = krb5_cc_resolve(context, "MEMORY:", &local_ccache);
+#endif
+
if (ret) {
log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"krb5_cc_resolve() failed when verifying KDC");
goto end;
}
+#ifdef HAVE_KRB5_CC_NEW_UNIQUE
+ ret = krb5_cc_new_unique(context, "MEMORY", NULL, &ret_ccache);
+#else
ret = krb5_cc_resolve(context, "MEMORY:", &ret_ccache);
+#endif
+
if (ret) {
log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"generating new memory ccache failed: %s",