From a6fb5ccdf2a2a2eae91f6a5247159e7575f24b10 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Sat, 3 Oct 2009 03:39:41 +0000 Subject: [PATCH] update the handmarshalled code in samr.cnf to handle ndr64 encoding svn path=/trunk/; revision=30261 --- epan/dissectors/packet-dcerpc-samr.c | 10 +++++----- epan/dissectors/pidl/samr.cnf | 19 ++++++++++--------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/epan/dissectors/packet-dcerpc-samr.c b/epan/dissectors/packet-dcerpc-samr.c index a295945078..fdb9339646 100644 --- a/epan/dissectors/packet-dcerpc-samr.c +++ b/epan/dissectors/packet-dcerpc-samr.c @@ -2082,7 +2082,7 @@ cnf_dissect_lsa_String(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree proto_tree *tree = NULL; int old_offset; header_field_info *hf_info; - ALIGN_TO_4_BYTES; + ALIGN_TO_5_BYTES; old_offset = offset; hf_info=proto_registrar_get_nth(hfindex); if (parent_tree) { @@ -2116,7 +2116,7 @@ cnf_dissect_hyper(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tre static int cnf_dissect_sec_desc_buf_(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { - guint32 len; + guint64 len; dcerpc_info *di = NULL; e_ctx_hnd *polhnd = NULL; dcerpc_call_value *dcv = NULL; @@ -2127,7 +2127,7 @@ cnf_dissect_sec_desc_buf_(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_t /*just a run to handle conformant arrays, nothing to dissect */ return offset; } - offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, + offset = dissect_ndr_4or8 (tvb, offset, pinfo, tree, drep, hf_samr_sec_desc_buf_len, &len); dcv = (dcerpc_call_value *)di->call_data; if(dcv){ @@ -2161,14 +2161,14 @@ cnf_dissect_sec_desc_buf_(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_t static int cnf_dissect_sec_desc_buf(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { - guint32 len; + guint64 len; dcerpc_info *di; di=pinfo->private_data; if(di->conformant_run){ /*just a run to handle conformant arrays, nothing to dissect */ return offset; } - offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, + offset = dissect_ndr_4or8 (tvb, offset, pinfo, tree, drep, hf_samr_sec_desc_buf_len, &len); offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, cnf_dissect_sec_desc_buf_, NDR_POINTER_UNIQUE, diff --git a/epan/dissectors/pidl/samr.cnf b/epan/dissectors/pidl/samr.cnf index 1679fe625d..460bdb0f25 100644 --- a/epan/dissectors/pidl/samr.cnf +++ b/epan/dissectors/pidl/samr.cnf @@ -151,10 +151,10 @@ PARAM_VALUE samr_dissect_element_GetDomPwInfo_domain_name_ 3|PIDL_SET_COL_INFO PARAM_VALUE samr_dissect_element_CreateUser_account_name_ 3|PIDL_SET_COL_INFO|PIDL_STR_SAVE PARAM_VALUE samr_dissect_element_CreateUser2_account_name_ 3|PIDL_SET_COL_INFO|PIDL_STR_SAVE -TYPE lsa_String "offset=cnf_dissect_lsa_String(tvb, offset, pinfo, tree, drep, @PARAM@, @HF@);" FT_STRING BASE_NONE 0 NULL 4 -TYPE lsa_AsciiString "offset=cnf_dissect_lsa_AsciiString(tvb, offset, pinfo, tree, drep, @PARAM@, @HF@);" FT_STRING BASE_NONE 0 NULL 4 -TYPE lsa_StringLarge "offset=cnf_dissect_lsa_String(tvb, offset, pinfo, tree, drep, @PARAM@, @HF@);" FT_STRING BASE_NONE 0 NULL 4 -TYPE lsa_AsciiStringLarge "offset=cnf_dissect_lsa_AsciiString(tvb, offset, pinfo, tree, drep, @PARAM@, @HF@);" FT_STRING BASE_NONE 0 NULL 4 +TYPE lsa_String "offset=cnf_dissect_lsa_String(tvb, offset, pinfo, tree, drep, @PARAM@, @HF@);" FT_STRING BASE_NONE 0 NULL 5 +TYPE lsa_AsciiString "offset=cnf_dissect_lsa_AsciiString(tvb, offset, pinfo, tree, drep, @PARAM@, @HF@);" FT_STRING BASE_NONE 0 NULL 5 +TYPE lsa_StringLarge "offset=cnf_dissect_lsa_String(tvb, offset, pinfo, tree, drep, @PARAM@, @HF@);" FT_STRING BASE_NONE 0 NULL 5 +TYPE lsa_AsciiStringLarge "offset=cnf_dissect_lsa_AsciiString(tvb, offset, pinfo, tree, drep, @PARAM@, @HF@);" FT_STRING BASE_NONE 0 NULL 5 TYPE hyper "offset=cnf_dissect_hyper(tvb, offset, pinfo, tree, drep, @PARAM@, @HF@);" FT_UINT64 BASE_DEC 0 NULL 8 @@ -366,7 +366,7 @@ cnf_dissect_lsa_String(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree int old_offset; header_field_info *hf_info; - ALIGN_TO_4_BYTES; + ALIGN_TO_5_BYTES; old_offset = offset; hf_info=proto_registrar_get_nth(hfindex); @@ -415,7 +415,7 @@ cnf_dissect_hyper(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tre static int cnf_dissect_sec_desc_buf_(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { - guint32 len; + guint64 len; dcerpc_info *di = NULL; e_ctx_hnd *polhnd = NULL; dcerpc_call_value *dcv = NULL; @@ -423,12 +423,13 @@ cnf_dissect_sec_desc_buf_(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_t struct access_mask_info *ami=NULL; di=pinfo->private_data; + if(di->conformant_run){ /*just a run to handle conformant arrays, nothing to dissect */ return offset; } - offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, + offset = dissect_ndr_4or8 (tvb, offset, pinfo, tree, drep, hf_samr_sec_desc_buf_len, &len); dcv = (dcerpc_call_value *)di->call_data; @@ -467,7 +468,7 @@ cnf_dissect_sec_desc_buf_(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_t static int cnf_dissect_sec_desc_buf(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { - guint32 len; + guint64 len; dcerpc_info *di; di=pinfo->private_data; @@ -476,7 +477,7 @@ cnf_dissect_sec_desc_buf(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr return offset; } - offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, + offset = dissect_ndr_4or8 (tvb, offset, pinfo, tree, drep, hf_samr_sec_desc_buf_len, &len); offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,