update the handmarshalled code in samr.cnf to handle ndr64 encoding
authorsahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 3 Oct 2009 03:39:41 +0000 (03:39 +0000)
committersahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 3 Oct 2009 03:39:41 +0000 (03:39 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30261 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-dcerpc-samr.c
epan/dissectors/pidl/samr.cnf

index a2959450782b8086c08c9ee03e88692a57f6acbc..fdb9339646b6d1c2012eaf3e7c59ac948802c98d 100644 (file)
@@ -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,
index 1679fe625d4b6c90041bb75080f408ea6ca64717..460bdb0f25b81b0a1e83798e2fbf66b9db8a5b03 100644 (file)
@@ -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,