From: Tom Yu Date: Mon, 8 Feb 2010 20:55:46 +0000 (+0000) Subject: pull up r23698 from trunk X-Git-Tag: krb5-1.8-beta1~10 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cc480060c7b31c33e69ba10d0a842b58c796b7db;p=krb5.git pull up r23698 from trunk ------------------------------------------------------------------------ r23698 | tlyu | 2010-02-05 15:52:42 -0500 (Fri, 05 Feb 2010) | 8 lines ticket: 6601 tags: pullup target_version: 1.8 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 version_fixed: 1.8 status: resolved git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-8@23709 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;