]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Don't assert GSS_C_MA_NOT_DFLT_MECH in mechglue
authorGreg Hudson <ghudson@mit.edu>
Fri, 31 Jul 2015 15:58:36 +0000 (11:58 -0400)
committerGreg Hudson <ghudson@mit.edu>
Mon, 10 Aug 2015 17:24:19 +0000 (13:24 -0400)
gss_inquire_attrs_for_mech() should not add GSS_C_MA_NOT_DFLT_MECH to
mechs which aren't the default.  The attribute means "MUST NOT be used
as a default mechanism" (RFC 5587) and is intended to be used by the
mechglue.  It does not mean "is not the default mech".

ticket: 8021

src/lib/gssapi/mechglue/g_mechattr.c

index 64bb03bc39cc642ec81e46df3b7988047ac76543..e9299f4737b227e702fefd42b42062d854d54ab7 100644 (file)
@@ -183,21 +183,6 @@ gss_inquire_attrs_for_mech(
             return status;
     }
 
-    if (mech_attrs != NULL && mech != gssint_get_mechanism(NULL)) {
-        if (*mech_attrs == GSS_C_NO_OID_SET) {
-            status = generic_gss_create_empty_oid_set(minor, mech_attrs);
-            if (GSS_ERROR(status))
-                return status;
-        }
-
-        status = generic_gss_add_oid_set_member(minor, GSS_C_MA_NOT_DFLT_MECH,
-                                                mech_attrs);
-        if (GSS_ERROR(status)) {
-            gss_release_oid_set(&tmpMinor, mech_attrs);
-            return status;
-        }
-    }
-
     if (known_mech_attrs != NULL && *known_mech_attrs == GSS_C_NO_OID_SET) {
         status = generic_gss_copy_oid_set(minor,
                                           gss_ma_known_attrs,