Change the interface to dissect_ndr_nt_PSID to take one extra parameter which if...
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>
Wed, 21 May 2003 09:34:54 +0000 (09:34 -0000)
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>
Wed, 21 May 2003 09:34:54 +0000 (09:34 -0000)
svn path=/trunk/; revision=7706

packet-dcerpc-lsa.c
packet-dcerpc-netlogon.c
packet-dcerpc-nt.h
packet-dcerpc-samr.c

index 04d1f0a5808cd0ccd0a33a5567d99ec759067946..84ef2244c4ea4624977c9d5c22922fd5ccf0149b 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright 2001,2003 Tim Potter <tpot@samba.org>
  *  2002  Added LSA command dissectors  Ronnie Sahlberg
  *
- * $Id: packet-dcerpc-lsa.c,v 1.77 2003/05/15 02:14:00 tpot Exp $
+ * $Id: packet-dcerpc-lsa.c,v 1.78 2003/05/21 09:34:53 sahlberg Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -784,7 +784,7 @@ lsa_dissect_POLICY_PRIMARY_DOMAIN_INFO(tvbuff_t *tvb, int offset,
 
        /* sid */
        offset = dissect_ndr_nt_PSID(tvb, offset,
-               pinfo, tree, drep);
+               pinfo, tree, drep, -1);
 
        proto_item_set_len(item, offset-old_offset);
        return offset;
@@ -811,7 +811,7 @@ lsa_dissect_POLICY_ACCOUNT_DOMAIN_INFO(tvbuff_t *tvb, int offset,
 
        /* sid */
        offset = dissect_ndr_nt_PSID(tvb, offset,
-               pinfo, tree, drep);
+               pinfo, tree, drep, -1);
 
        proto_item_set_len(item, offset-old_offset);
        return offset;
@@ -1025,7 +1025,7 @@ lsa_dissect_POLICY_DNS_DOMAIN_INFO(tvbuff_t *tvb, int offset,
                pinfo, tree, drep);
 
        /* SID pointer */
-       offset = dissect_ndr_nt_PSID(tvb, offset, pinfo, tree, drep);
+       offset = dissect_ndr_nt_PSID(tvb, offset, pinfo, tree, drep, -1);
 
        proto_item_set_len(item, offset-old_offset);
        return offset;
@@ -1361,7 +1361,7 @@ lsa_dissect_LSA_TRUST_INFORMATION(tvbuff_t *tvb, int offset,
 
        /* sid */
        offset = dissect_ndr_nt_PSID(tvb, offset,
-               pinfo, tree, drep);
+               pinfo, tree, drep, -1);
 
        proto_item_set_len(item, offset-old_offset);
        return offset;
@@ -1451,7 +1451,7 @@ lsa_dissect_LSA_TRUST_INFORMATION_EX(tvbuff_t *tvb, int offset,
 
        /* sid */
        offset = dissect_ndr_nt_PSID(tvb, offset,
-               pinfo, tree, drep);
+               pinfo, tree, drep, -1);
 
        /* direction */
         offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
@@ -2282,7 +2282,7 @@ lsa_dissect_LSA_TRUSTED_DOMAIN(tvbuff_t *tvb, int offset,
 
        /* sid */
        offset = dissect_ndr_nt_PSID(tvb, offset,
-               pinfo, tree, drep);
+               pinfo, tree, drep, -1);
 
        proto_item_set_len(item, offset-old_offset);
        return offset;
index e2db33be785788e96c8f5bba213257123ad59589..f81447aafd0e673a4b3a7d874f355124cf16eba2 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright 2001,2003 Tim Potter <tpot@samba.org>
  *  2002 structure and command dissectors by Ronnie Sahlberg
  *
- * $Id: packet-dcerpc-netlogon.c,v 1.80 2003/05/15 04:58:53 tpot Exp $
+ * $Id: packet-dcerpc-netlogon.c,v 1.81 2003/05/21 09:34:54 sahlberg Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -991,7 +991,7 @@ netlogon_dissect_VALIDATION_SAM_INFO(tvbuff_t *tvb, int offset,
                hf_netlogon_logon_dom, 0);
 
        offset = dissect_ndr_nt_PSID(tvb, offset,
-               pinfo, tree, drep);
+               pinfo, tree, drep, -1);
 
        for(i=0;i<10;i++){
                offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
@@ -1108,7 +1108,7 @@ netlogon_dissect_VALIDATION_SAM_INFO2(tvbuff_t *tvb, int offset,
                hf_netlogon_logon_dom, 0);
 
        offset = dissect_ndr_nt_PSID(tvb, offset,
-               pinfo, tree, drep);
+               pinfo, tree, drep, -1);
 
        for(i=0;i<10;i++){
                offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
@@ -2359,7 +2359,7 @@ netlogon_dissect_DELTA_POLICY(tvbuff_t *tvb, int offset,
                hf_netlogon_domain_name, 0);
 
        offset = dissect_ndr_nt_PSID(tvb, offset,
-               pinfo, tree, drep);
+               pinfo, tree, drep, -1);
 
        offset = netlogon_dissect_QUOTA_LIMITS(tvb, offset,
                pinfo, tree, drep);
@@ -3031,23 +3031,23 @@ netlogon_dissect_DELTA_ID_UNION(tvbuff_t *tvb, int offset,
                break;
        case 13:
                offset = dissect_ndr_nt_PSID(tvb, offset,
-                       pinfo, tree, drep);
+                       pinfo, tree, drep, -1);
                break;
        case 14:
                offset = dissect_ndr_nt_PSID(tvb, offset,
-                       pinfo, tree, drep);
+                       pinfo, tree, drep, -1);
                break;
        case 15:
                offset = dissect_ndr_nt_PSID(tvb, offset,
-                       pinfo, tree, drep);
+                       pinfo, tree, drep, -1);
                break;
        case 16:
                offset = dissect_ndr_nt_PSID(tvb, offset,
-                       pinfo, tree, drep);
+                       pinfo, tree, drep, -1);
                break;
        case 17:
                offset = dissect_ndr_nt_PSID(tvb, offset,
-                       pinfo, tree, drep);
+                       pinfo, tree, drep, -1);
                break;
        case 18:
                offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, 
@@ -4928,7 +4928,7 @@ netlogon_dissect_DS_DOMAIN_TRUSTS(tvbuff_t *tvb, int offset,
                hf_netlogon_trust_attribs, &tmp);
 
        /* SID pointer */
-       offset = dissect_ndr_nt_PSID(tvb, offset, pinfo, tree, drep);
+       offset = dissect_ndr_nt_PSID(tvb, offset, pinfo, tree, drep, -1);
 
        /* GUID */
        offset = dissect_nt_GUID(tvb, offset, pinfo, tree, drep);
index 2a48a54a34abd4fda53297ca3c2ce7aecf8c93be..3fa0a741c8594ca1a8266300e2cb8678d084d6e9 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for DCERPC over SMB packet disassembly
  * Copyright 2001-2003 Tim Potter <tpot@samba.org>
  *
- * $Id: packet-dcerpc-nt.h,v 1.44 2003/05/15 05:24:18 guy Exp $
+ * $Id: packet-dcerpc-nt.h,v 1.45 2003/05/21 09:34:54 sahlberg Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -95,7 +95,7 @@ dissect_ndr_nt_SID(tvbuff_t *tvb, int offset,
 int
 dissect_ndr_nt_PSID(tvbuff_t *tvb, int offset,
                              packet_info *pinfo, proto_tree *parent_tree,
-                             char *drep);
+                             char *drep, int hf_sid);
 int
 dissect_ndr_nt_PSID_ARRAY(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *parent_tree,
index e9e6bded7ce0af623a295a123ea28b9f2737fa0c..578d119177d2fa58d04ed38fe00e02e00a846644 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright 2001,2003 Tim Potter <tpot@samba.org>
  *   2002 Added all command dissectors  Ronnie Sahlberg
  *
- * $Id: packet-dcerpc-samr.c,v 1.86 2003/05/15 02:14:00 tpot Exp $
+ * $Id: packet-dcerpc-samr.c,v 1.87 2003/05/21 09:34:54 sahlberg Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -2655,7 +2655,7 @@ samr_dissect_lookup_domain_reply(tvbuff_t *tvb, int offset,
 int
 dissect_ndr_nt_PSID(tvbuff_t *tvb, int offset,
                              packet_info *pinfo, proto_tree *parent_tree,
-                             char *drep)
+                             char *drep, int hf_sid)
 {
        proto_item *item=NULL;
        proto_tree *tree=NULL;
@@ -2674,7 +2674,14 @@ dissect_ndr_nt_PSID(tvbuff_t *tvb, int offset,
        proto_item_set_len(item, offset-old_offset);
        return offset;
 }
-
+static int
+dissect_ndr_nt_PSID_no_hf(tvbuff_t *tvb, int offset,
+                             packet_info *pinfo, proto_tree *parent_tree,
+                             char *drep)
+{
+       offset=dissect_ndr_nt_PSID(tvb, offset, pinfo, parent_tree, drep, -1);
+       return offset;
+}
 
 static int
 dissect_ndr_nt_PSID_ARRAY_sids (tvbuff_t *tvb, int offset,
@@ -2682,7 +2689,7 @@ dissect_ndr_nt_PSID_ARRAY_sids (tvbuff_t *tvb, int offset,
                              char *drep)
 {
        offset = dissect_ndr_ucarray(tvb, offset, pinfo, tree, drep,
-                       dissect_ndr_nt_PSID);
+                       dissect_ndr_nt_PSID_no_hf);
 
        return offset;
 }
@@ -2729,7 +2736,7 @@ dissect_ndr_nt_SID_AND_ATTRIBUTES(tvbuff_t *tvb, int offset,
                tree = proto_item_add_subtree(item, ett_samr_sid_and_attributes);
        }
 
-       offset = dissect_ndr_nt_PSID(tvb, offset, pinfo, tree, drep);
+       offset = dissect_ndr_nt_PSID(tvb, offset, pinfo, tree, drep, -1);
 
         offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
                                      hf_samr_attrib, NULL);