]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
fix regression in mech SPI availability check lhoward/moonshot-mechglue-fixes
authorLuke Howard <lukeh@padl.com>
Sat, 9 Apr 2011 03:40:43 +0000 (03:40 +0000)
committerLuke Howard <lukeh@padl.com>
Sat, 9 Apr 2011 03:40:43 +0000 (03:40 +0000)
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

index 286904dcc828d8f8d2330b294eafee6ffbc1ba3c..eec42f739c76fcf6347479d7cb3d7b5a442db7a0 100644 (file)
@@ -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,