GSSEAP_KRB_INIT(&krbContext);
code = getAcceptorKey(krbContext, ctx, cred, &server, &acceptorKey);
- if (code == KRB5_KT_NOTFOUND) {
+ if (code != 0) {
*minor = code;
return GSS_S_UNAVAILABLE;
- } else if (code != 0)
- goto cleanup;
+ }
/*
* Generate a random session key to place in the ticket and
#ifdef HAVE_HEIMDAL_VERSION
gss_ctx_id_t glueContext,
#else
- gss_ctx_id_t glueContext GSSEAP_UNUSED,
-#endif
gss_name_t glueName,
+#endif
gss_name_t mechName)
{
OM_uint32 major, tmpMinor;
goto cleanup;
major = gssEapImportName(minor, &nameBuf, GSS_C_NT_USER_NAME,
- pMechName);
+ ctx->mechanismUsed, pMechName);
if (GSS_ERROR(major))
goto cleanup;
- major = defrostAttrContext(minor, ctx->kerberosCtx, glueName, *pMechName);
+ major = defrostAttrContext(minor,
+#ifdef HAVE_HEIMDAL_VERSION
+ ctx->kerberosCtx,
+#else
+ glueName,
+#endif
+ *pMechName);
if (GSS_ERROR(major))
goto cleanup;