From: Greg Hudson Date: Thu, 11 Aug 2011 15:13:52 +0000 (+0000) Subject: Fix major status handling in gss_acquire_cred X-Git-Tag: krb5-1.10-alpha1~278 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=167aed220154427f3a7b5dbb859d93b773c08992;p=krb5.git Fix major status handling in gss_acquire_cred If we have at least one cred element after the mech loop, reset major before continuing on, or we could mistakenly return a failure status from the last mech (and free the returned creds). Reported by aberry@likewise.com. ticket: 6944 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25097 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/gssapi/mechglue/g_acquire_cred.c b/src/lib/gssapi/mechglue/g_acquire_cred.c index 71bbf9e21..63d390552 100644 --- a/src/lib/gssapi/mechglue/g_acquire_cred.c +++ b/src/lib/gssapi/mechglue/g_acquire_cred.c @@ -180,6 +180,7 @@ OM_uint32 * time_rec; /* ensure that we have at least one credential element */ if (creds->count < 1) goto cleanup; + major = GSS_S_COMPLETE; /* * fill in output parameters