X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=mech_eap%2Futil_reauth.c;h=465bb16b4b7c53028105b634edf77f171ec0d356;hb=refs%2Fheads%2Fddf-name;hp=22f089f4196538afce01cafaef6b3ef2306c32e3;hpb=3dcac77927965ec56eb76d865b44a8b2bee4594b;p=moonshot.git diff --git a/mech_eap/util_reauth.c b/mech_eap/util_reauth.c index 22f089f..465bb16 100644 --- a/mech_eap/util_reauth.c +++ b/mech_eap/util_reauth.c @@ -217,11 +217,10 @@ gssEapMakeReauthCreds(OM_uint32 *minor, 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 @@ -655,9 +654,8 @@ defrostAttrContext(OM_uint32 *minor, #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; @@ -739,7 +737,13 @@ gssEapGlueToMechName(OM_uint32 *minor, 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;