diff options
author | Guy Harris <guy@alum.mit.edu> | 2004-02-21 04:55:42 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2004-02-21 04:55:42 +0000 |
commit | 663c7d599c11abb5e13455230ae050a1911efb4a (patch) | |
tree | 6f2f44ac375f72de4b604ce11570287671ef860c /packet-dcerpc-fldb.c | |
parent | dc883b3bc7c0a33587228f6d939c5ae68c293bad (diff) |
From Jaime Fournier:
properly handle the name string in a KerbPrin in a getSiteInfo
response;
dispaly name sizes in decimal rather than hex.
svn path=/trunk/; revision=10158
Diffstat (limited to 'packet-dcerpc-fldb.c')
-rw-r--r-- | packet-dcerpc-fldb.c | 42 |
1 files changed, 10 insertions, 32 deletions
diff --git a/packet-dcerpc-fldb.c b/packet-dcerpc-fldb.c index 8460f1b2b8..8b55a7e603 100644 --- a/packet-dcerpc-fldb.c +++ b/packet-dcerpc-fldb.c @@ -5,7 +5,7 @@ * This information is based off the released idl files from opengroup. * ftp://ftp.opengroup.org/pub/dce122/dce/src/file.tar.gz file/flserver/fldb_proc.idl * - * $Id: packet-dcerpc-fldb.c,v 1.6 2004/02/18 06:08:29 guy Exp $ + * $Id: packet-dcerpc-fldb.c,v 1.7 2004/02/21 04:55:42 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -1112,10 +1112,8 @@ fldb_dissect_getsiteinfo_resp (tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree, guint8 * drep) { - dcerpc_info *di; - - gint buff_remaining = 0; + dcerpc_info *di; const guint8 *namestring; e_uuid_t owner, objid; guint32 creationquota, creationuses, deletedflag, spare2, spare3, spare4, @@ -1148,31 +1146,13 @@ fldb_dissect_getsiteinfo_resp (tvbuff_t * tvb, int offset, offset += 48; /* part of kerbprin before name... */ - buff_remaining = tvb_length_remaining (tvb, offset); - buff_remaining -= 64; /* size of values left to read. */ - - if (buff_remaining < 254) - { - proto_tree_add_string (tree, hf_fldb_namestring, tvb, offset, - hf_fldb_namestring_size, tvb_get_ptr (tvb, - offset, - buff_remaining)); - namestring = tvb_get_ptr (tvb, offset, buff_remaining); - offset += buff_remaining; - if (check_col (pinfo->cinfo, COL_INFO)) - col_append_fstr (pinfo->cinfo, COL_INFO, " %s", namestring); - } - else - { - if (check_col (pinfo->cinfo, COL_INFO)) - col_append_fstr (pinfo->cinfo, COL_INFO, - " :FIXME!: Invalid string length of %u", - buff_remaining); - } + proto_tree_add_string (tree, hf_fldb_namestring, tvb, offset, hf_fldb_namestring_size, tvb_get_ptr (tvb, offset, 64)); + namestring = tvb_get_ptr (tvb, offset, 64); + offset += 64; + if (check_col (pinfo->cinfo, COL_INFO)) + col_append_fstr (pinfo->cinfo, COL_INFO, " %s", namestring); - offset = - dissect_ndr_uuid_t (tvb, offset, pinfo, tree, drep, hf_fldb_uuid_owner, - &owner); + offset = dissect_ndr_uuid_t (tvb, offset, pinfo, tree, drep, hf_fldb_uuid_owner, &owner); if (check_col (pinfo->cinfo, COL_INFO)) col_append_fstr (pinfo->cinfo, COL_INFO, " Owner - %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", @@ -1192,8 +1172,6 @@ fldb_dissect_getsiteinfo_resp (tvbuff_t * tvb, int offset, objid.Data4[4], objid.Data4[5], objid.Data4[6], objid.Data4[7]); - - offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fldb_creationquota, &creationquota); @@ -2078,10 +2056,10 @@ proto_register_fldb (void) {"nextstartp", "fldb.nextstartp", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL}}, {&hf_fldb_afsNameString_t_principalName_size, - {"Principal Name Size", "fldb.principalName_size", FT_UINT32, BASE_HEX, + {"Principal Name Size", "fldb.principalName_size", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL}}, {&hf_fldb_afsNameString_t_principalName_size2, - {"Principal Name Size2", "fldb.principalName_size2", FT_UINT32, BASE_HEX, + {"Principal Name Size2", "fldb.principalName_size2", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL}}, {&hf_fldb_afsNameString_t_principalName_string, {"Principal Name", "fldb.NameString_principal", FT_STRING, BASE_NONE, |