]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Don't send empty etype info from KDC
authorGreg Hudson <ghudson@mit.edu>
Mon, 29 Apr 2013 18:55:31 +0000 (14:55 -0400)
committerGreg Hudson <ghudson@mit.edu>
Fri, 3 May 2013 20:11:28 +0000 (16:11 -0400)
RFC 4120 prohibits empty ETYPE-INFO2 sequences (though not ETYPE-INFO
sequences), and our client errors out if it sees an empty sequence of
either.

ticket: 7630

src/kdc/kdc_preauth.c

index b7f9e151440d1debc0c83b1d3abae375049a5cb6..9c04f709ca63a5987b4c68333f9de77ba3fc1968 100644 (file)
@@ -1420,6 +1420,11 @@ etype_info_helper(krb5_context context, krb5_kdc_req *request,
             seen_des++;
         }
     }
+
+    /* If the list is empty, don't send it at all. */
+    if (i == 0)
+        goto cleanup;
+
     if (etype_info2)
         retval = encode_krb5_etype_info2(entry, &scratch);
     else