From 48b811614b5d5933a79387f9a9687c2513bf7bca Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Sun, 13 May 2012 13:12:06 -0400 Subject: [PATCH] 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. --- src/lib/gssapi/spnego/spnego_mech.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; -- 2.26.2