krb5 commit: Don't stomp minor code in spnego_gss_acquire_cred

Greg Hudson ghudson at MIT.EDU
Sun May 13 13:12:53 EDT 2012


https://github.com/krb5/krb5/commit/48b811614b5d5933a79387f9a9687c2513bf7bca
commit 48b811614b5d5933a79387f9a9687c2513bf7bca
Author: Greg Hudson <ghudson at mit.edu>
Date:   Sun May 13 13:12:06 2012 -0400

    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 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/gssapi/spnego/spnego_mech.c b/src/lib/gssapi/spnego/spnego_mech.c
index 70246b6..0c4e727 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;


More information about the cvs-krb5 mailing list