From 904a49c1a5322d593809c30bc88236c7edbb094c Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Sat, 9 Apr 2011 03:40:43 +0000 Subject: fix regression in mech SPI availability check git-svn-id: svn://anonsvn.mit.edu/krb5/users/lhoward/moonshot-mechglue-fixes@24868 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/gssapi/mechglue/g_authorize_localname.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/gssapi/mechglue/g_authorize_localname.c b/src/lib/gssapi/mechglue/g_authorize_localname.c index 286904d..eec42f7 100644 --- a/src/lib/gssapi/mechglue/g_authorize_localname.c +++ b/src/lib/gssapi/mechglue/g_authorize_localname.c @@ -163,6 +163,7 @@ gss_authorize_localname(OM_uint32 *minor, OM_uint32 major; gss_union_name_t unionName; gss_union_name_t unionUser; + int mechAvailable = 0; if (minor == NULL) return (GSS_S_CALL_INACCESSIBLE_WRITE); @@ -182,14 +183,16 @@ gss_authorize_localname(OM_uint32 *minor, major = mech_authorize_localname(minor, unionName, unionUser); if (major == GSS_S_COMPLETE) return (GSS_S_COMPLETE); + else if (major != GSS_S_UNAVAILABLE) + mechAvailable = 1; /* If attribute exists, we evaluate attribute */ major = attr_authorize_localname(minor, unionName, unionUser); if (major == GSS_S_COMPLETE || major == GSS_S_UNAUTHORIZED) return (major); - /* If mech returns unavail, we compare the local name */ - if (major == GSS_S_UNAVAILABLE && + /* If mech did not implement SPI, compare the local name */ + if (mechAvailable == 0 && unionName->mech_type != GSS_C_NO_OID) { major = compare_names_authorize_localname(minor, unionName, -- cgit v1.1