Apply abartlet@samba.org's "raw NTLMSSP over GSS-SPNEGO" patch.
authorTim Potter <tpot@samba.org>
Thu, 17 Mar 2005 02:27:26 +0000 (02:27 -0000)
committerTim Potter <tpot@samba.org>
Thu, 17 Mar 2005 02:27:26 +0000 (02:27 -0000)
svn path=/trunk/; revision=13788

epan/dissectors/packet-gssapi.c

index 23d384f56b08ea1f75440c2c3e9c726d088a5fe8..b4084ff4e2fdfd64f4e28703de53a18e93020093 100644 (file)
@@ -55,6 +55,8 @@ static gint ett_gssapi = -1;
  * Subdissectors
  */
 
+static dissector_handle_t ntlmssp_handle = NULL;
+
 static GHashTable *gssapi_oids;
 
 static gint gssapi_oid_equal(gconstpointer k1, gconstpointer k2)
@@ -247,14 +249,19 @@ dissect_gssapi_work(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
                  }
                  if (!value)
                  {
-                   proto_tree_add_text(subtree, tvb, offset, 0,
-                       "Unknown header (cls=%d, con=%d, tag=%d)",
-                       cls, con, tag);
+                   /* It could be NTLMSSP, with no OID.  This can happen 
+                      for anything that microsoft calls 'Negotiate' or GSS-SPNEGO */
+                   if (tvb_strneql(tvb, offset, "NTLMSSP", 7) == 0) {
+                     call_dissector(ntlmssp_handle, tvb_new_subset(tvb, offset, -1, -1), pinfo, subtree);
+                   } else {
+                     proto_tree_add_text(subtree, tvb, offset, 0,
+                                         "Unknown header (cls=%d, con=%d, tag=%d)",
+                                         cls, con, tag);
+                   }
                    return_offset = tvb_length(tvb);
                    goto done;
-                 }
-                 else 
-                 {
+
+                 } else {
                    tvbuff_t *oid_tvb;
 
                    /* Naughty ... no way to reset the offset */
@@ -512,6 +519,8 @@ proto_reg_handoff_gssapi(void)
 {
        data_handle = find_dissector("data");
 
+       ntlmssp_handle = find_dissector("ntlmssp");
+
        register_dcerpc_auth_subdissector(DCE_C_AUTHN_LEVEL_CONNECT,
                                          DCE_C_RPC_AUTHN_PROTOCOL_SPNEGO,
                                          &gssapi_auth_fns);