From: Greg Hudson Date: Sun, 13 May 2012 17:12:06 +0000 (-0400) Subject: Don't stomp minor code in spnego_gss_acquire_cred X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=48b811614b5d5933a79387f9a9687c2513bf7bca;p=krb5.git Don't stomp minor code in spnego_gss_acquire_cred When spnego_gss_acquire_cred passes through a failure status from the mechglue, it overwrites the minor code with a call to gss_release_oid_set(). Use a temporary minor status for that and a related call. --- diff --git a/src/lib/gssapi/spnego/spnego_mech.c b/src/lib/gssapi/spnego/spnego_mech.c index 70246b6ac..0c4e7279d 100644 --- a/src/lib/gssapi/spnego/spnego_mech.c +++ b/src/lib/gssapi/spnego/spnego_mech.c @@ -331,7 +331,7 @@ spnego_gss_acquire_cred(OM_uint32 *minor_status, gss_OID_set *actual_mechs, OM_uint32 *time_rec) { - OM_uint32 status; + OM_uint32 status, tmpmin; gss_OID_set amechs; gss_cred_id_t mcred = NULL; spnego_gss_cred_id_t spcred = NULL; @@ -375,9 +375,9 @@ spnego_gss_acquire_cred(OM_uint32 *minor_status, } if (actual_mechs && amechs != GSS_C_NULL_OID_SET) { - (void) gssint_copy_oid_set(minor_status, amechs, actual_mechs); + (void) gssint_copy_oid_set(&tmpmin, amechs, actual_mechs); } - (void) gss_release_oid_set(minor_status, &amechs); + (void) gss_release_oid_set(&tmpmin, &amechs); if (status == GSS_S_COMPLETE) { spcred->mcred = mcred;