diff options
author | Luke Howard <lukeh@padl.com> | 2011-04-09 03:40:43 +0000 |
---|---|---|
committer | Luke Howard <lukeh@padl.com> | 2011-04-09 03:40:43 +0000 |
commit | 904a49c1a5322d593809c30bc88236c7edbb094c (patch) | |
tree | 4f08afc565bc56850eb6c859e28e91d323b2e4c9 /src/lib/gssapi | |
parent | cbb457a9df5982a0e81a1063da3ea0868081d6ee (diff) | |
download | krb5-904a49c1a5322d593809c30bc88236c7edbb094c.zip krb5-904a49c1a5322d593809c30bc88236c7edbb094c.tar.gz krb5-904a49c1a5322d593809c30bc88236c7edbb094c.tar.bz2 |
fix regression in mech SPI availability checklhoward/moonshot-mechglue-fixes
git-svn-id: svn://anonsvn.mit.edu/krb5/users/lhoward/moonshot-mechglue-fixes@24868 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/gssapi')
-rw-r--r-- | src/lib/gssapi/mechglue/g_authorize_localname.c | 7 |
1 files 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, |