From: Tom Yu Date: Fri, 5 Feb 2010 20:52:42 +0000 (+0000) Subject: Apply patch from Arlene Berry to handle the case where a mechanism X-Git-Tag: krb5-1.9-beta1~358 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fb17c38c7f85eecc87132484de2bdf4688cb5d33;p=krb5.git Apply patch from Arlene Berry to handle the case where a mechanism implements set_cred_option but does not implement the requested option. ticket: 6601 tags: pullup target_version: 1.8 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23698 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/gssapi/mechglue/g_set_cred_option.c b/src/lib/gssapi/mechglue/g_set_cred_option.c index fc8ed4c76..ff388d9e3 100644 --- a/src/lib/gssapi/mechglue/g_set_cred_option.c +++ b/src/lib/gssapi/mechglue/g_set_cred_option.c @@ -45,6 +45,8 @@ gssspi_set_cred_option(OM_uint32 *minor_status, gss_mechanism mech; int i; OM_uint32 status; + OM_uint32 mech_status; + OM_uint32 mech_minor_status; if (minor_status == NULL) return GSS_S_CALL_INACCESSIBLE_WRITE; @@ -66,14 +68,20 @@ gssspi_set_cred_option(OM_uint32 *minor_status, } if (mech->gssspi_set_cred_option == NULL) { - status = GSS_S_UNAVAILABLE; continue; } - status = (mech->gssspi_set_cred_option)(minor_status, + mech_status = (mech->gssspi_set_cred_option)(&mech_minor_status, union_cred->cred_array[i], desired_object, value); + if (mech_status == GSS_S_UNAVAILABLE) { + continue; + } + else { + status = mech_status; + *minor_status = mech_minor_status; + } if (status != GSS_S_COMPLETE) { map_error(minor_status, mech); break;