If krb5_gss_canonicalize_name is given GSS_C_NULL_OID as the mechanism,
authorRuss Allbery <rra@stanford.edu>
Mon, 12 Jun 2006 18:35:03 +0000 (18:35 +0000)
committerRuss Allbery <rra@stanford.edu>
Mon, 12 Jun 2006 18:35:03 +0000 (18:35 +0000)
assume krb5 using similar logic as other library functions rather than
failing.  Patch provided by Daniel Kahn Gillmor.

Ticket: 3467
Version_Reported: 1.4.3

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18113 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/gssapi/krb5/canon_name.c

index aed67c3527377c85a5b230db661f747619666c3b..0f7c9cd9c0a2bb86a537ac6e2fb1e3ea6d8aad97 100644 (file)
@@ -34,7 +34,8 @@ OM_uint32 krb5_gss_canonicalize_name(OM_uint32  *minor_status,
                                     const gss_OID mech_type,
                                     gss_name_t *output_name)
 {
-    if (!g_OID_equal(gss_mech_krb5, mech_type) &&
+    if ((mech_type != GSS_C_NULL_OID) &&
+       !g_OID_equal(gss_mech_krb5, mech_type) &&
        !g_OID_equal(gss_mech_krb5_old, mech_type)) {
        *minor_status = 0;
        return(GSS_S_BAD_MECH);