Skip to content

Commit

Permalink
Don't stomp minor code in spnego_gss_acquire_cred
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
greghudson committed May 13, 2012
1 parent 8dace5c commit 48b8116
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/gssapi/spnego/spnego_mech.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 48b8116

Please sign in to comment.