From fb17c38c7f85eecc87132484de2bdf4688cb5d33 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Fri, 5 Feb 2010 20:52:42 +0000 Subject: [PATCH] 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 --- src/lib/gssapi/mechglue/g_set_cred_option.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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; -- 2.26.2