diff options
-rw-r--r-- | packet-dcerpc-lsa.c | 22 | ||||
-rw-r--r-- | packet-dcerpc-nt.h | 4 | ||||
-rw-r--r-- | packet-dcerpc-samr.c | 64 |
3 files changed, 49 insertions, 41 deletions
diff --git a/packet-dcerpc-lsa.c b/packet-dcerpc-lsa.c index 84ef2244c4..4c0255f50c 100644 --- a/packet-dcerpc-lsa.c +++ b/packet-dcerpc-lsa.c @@ -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.78 2003/05/21 09:34:53 sahlberg Exp $ + * $Id: packet-dcerpc-lsa.c,v 1.79 2003/05/21 10:06:29 sahlberg Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -1717,7 +1717,7 @@ lsa_dissect_lsaclearauditlog_rqst(tvbuff_t *tvb, int offset, pinfo, tree, drep); offset = dissect_ndr_nt_SID(tvb, offset, - pinfo, tree, drep); + pinfo, tree, drep, -1); /* unknown */ offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, @@ -1798,7 +1798,7 @@ lsa_dissect_lsaopentrusteddomain_rqst(tvbuff_t *tvb, int offset, pinfo, tree, drep); offset = dissect_ndr_nt_SID(tvb, offset, - pinfo, tree, drep); + pinfo, tree, drep, -1); offset = lsa_dissect_ACCESS_MASK(tvb, offset, pinfo, tree, drep); @@ -1829,7 +1829,7 @@ lsa_dissect_lsadeletetrusteddomain_rqst(tvbuff_t *tvb, int offset, pinfo, tree, drep); offset = dissect_ndr_nt_SID(tvb, offset, - pinfo, tree, drep); + pinfo, tree, drep, -1); return offset; } @@ -2545,7 +2545,7 @@ lsa_dissect_lsaopenaccount_rqst(tvbuff_t *tvb, int offset, /* [in, ref] SID *account */ offset = dissect_ndr_nt_SID(tvb, offset, - pinfo, tree, drep); + pinfo, tree, drep, -1); /* [in] ACCESS_MASK access */ offset = lsa_dissect_ACCESS_MASK(tvb, offset, @@ -2908,7 +2908,7 @@ lsa_dissect_lsaenumerateaccountrights_rqst(tvbuff_t *tvb, int offset, /* [in, ref] SID *account */ offset = dissect_ndr_nt_SID(tvb, offset, - pinfo, tree, drep); + pinfo, tree, drep, -1); return offset; } @@ -2939,7 +2939,7 @@ lsa_dissect_lsaaddaccountrights_rqst(tvbuff_t *tvb, int offset, /* [in, ref] SID *account */ offset = dissect_ndr_nt_SID(tvb, offset, - pinfo, tree, drep); + pinfo, tree, drep, -1); /* [in, ref] LSA_UNICODE_STRING_ARRAY *rights */ offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, @@ -2970,7 +2970,7 @@ lsa_dissect_lsaremoveaccountrights_rqst(tvbuff_t *tvb, int offset, /* [in, ref] SID *account */ offset = dissect_ndr_nt_SID(tvb, offset, - pinfo, tree, drep); + pinfo, tree, drep, -1); /* remove all */ offset = dissect_ndr_uint8 (tvb, offset, pinfo, tree, drep, @@ -3079,7 +3079,7 @@ lsa_dissect_lsaquerytrusteddomaininfo_rqst(tvbuff_t *tvb, int offset, /* [in, ref] SID *sid */ offset = dissect_ndr_nt_SID(tvb, offset, - pinfo, tree, drep); + pinfo, tree, drep, -1); /* [in] TRUSTED_INFORMATION_CLASS level */ offset = dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep, @@ -3150,7 +3150,7 @@ lsa_dissect_lsasettrusteddomaininfo_rqst(tvbuff_t *tvb, int offset, /* [in, ref] SID *sid */ offset = dissect_ndr_nt_SID(tvb, offset, - pinfo, tree, drep); + pinfo, tree, drep, -1); /* [in] TRUSTED_INFORMATION_CLASS level */ offset = dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep, @@ -3365,7 +3365,7 @@ lsa_dissect_lsacreateaccount_rqst(tvbuff_t *tvb, int offset, pinfo, tree, drep); offset = dissect_ndr_nt_SID(tvb, offset, - pinfo, tree, drep); + pinfo, tree, drep, -1); offset = lsa_dissect_ACCESS_MASK(tvb, offset, pinfo, tree, drep); diff --git a/packet-dcerpc-nt.h b/packet-dcerpc-nt.h index 3fa0a741c8..01700a6b9e 100644 --- a/packet-dcerpc-nt.h +++ b/packet-dcerpc-nt.h @@ -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.45 2003/05/21 09:34:54 sahlberg Exp $ + * $Id: packet-dcerpc-nt.h,v 1.46 2003/05/21 10:06:29 sahlberg Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -91,7 +91,7 @@ dissect_ndr_nt_LOGON_HOURS(tvbuff_t *tvb, int offset, int dissect_ndr_nt_SID(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, - char *drep); + char *drep, int hf_sid); int dissect_ndr_nt_PSID(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *parent_tree, diff --git a/packet-dcerpc-samr.c b/packet-dcerpc-samr.c index 578d119177..57bbdc5917 100644 --- a/packet-dcerpc-samr.c +++ b/packet-dcerpc-samr.c @@ -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.87 2003/05/21 09:34:54 sahlberg Exp $ + * $Id: packet-dcerpc-samr.c,v 1.88 2003/05/21 10:06:29 sahlberg Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -473,7 +473,7 @@ struct access_mask_info samr_group_access_mask_info = { int dissect_ndr_nt_SID(tvbuff_t *tvb, int offset, packet_info *pinfo, - proto_tree *tree, char *drep) + proto_tree *tree, char *drep, int hf_sid) { dcerpc_info *di = (dcerpc_info *)pinfo->private_data; dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data; @@ -496,15 +496,20 @@ dissect_ndr_nt_SID(tvbuff_t *tvb, int offset, packet_info *pinfo, return offset; } - static int -dissect_ndr_nt_SID_ptr(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, - char *drep) +dissect_ndr_nt_SID_no_hf(tvbuff_t *tvb, int offset, packet_info *pinfo, + proto_tree *tree, char *drep) { - offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, - dissect_ndr_nt_SID, NDR_POINTER_UNIQUE, - "SID pointer", -1); + offset = dissect_ndr_nt_SID(tvb, offset, pinfo, tree, drep, -1); + return offset; +} +static int +dissect_ndr_nt_SID_hf_through_ptr(tvbuff_t *tvb, int offset, packet_info *pinfo, + proto_tree *tree, char *drep) +{ + dcerpc_info *di = (dcerpc_info *)pinfo->private_data; + + offset = dissect_ndr_nt_SID(tvb, offset, pinfo, tree, drep, di->hf_index); return offset; } @@ -1388,7 +1393,7 @@ samr_dissect_open_domain_rqst(tvbuff_t *tvb, int offset, &samr_domain_access_mask_info); offset = dissect_ndr_pointer_cb( - tvb, offset, pinfo, tree, drep, dissect_ndr_nt_SID, + tvb, offset, pinfo, tree, drep, dissect_ndr_nt_SID_no_hf, NDR_POINTER_REF, "SID:", -1, append_sid_col_info, NULL); return offset; @@ -1431,9 +1436,10 @@ samr_dissect_context_handle_SID(tvbuff_t *tvb, int offset, offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep, hf_samr_hnd, NULL, FALSE, FALSE); - offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, - dissect_ndr_nt_SID, NDR_POINTER_REF, - "SID", -1, 0); + offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, + dissect_ndr_nt_SID_no_hf, NDR_POINTER_REF, + "SID pointer", -1); + return offset; } #endif @@ -2643,9 +2649,9 @@ samr_dissect_lookup_domain_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, char *drep) { - offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, - dissect_ndr_nt_SID_ptr, NDR_POINTER_REF, - "SID:", -1); + offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, + dissect_ndr_nt_SID_no_hf, NDR_POINTER_UNIQUE, + "SID pointer", -1); offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep, hf_samr_rc, NULL); @@ -2667,9 +2673,9 @@ dissect_ndr_nt_PSID(tvbuff_t *tvb, int offset, tree = proto_item_add_subtree(item, ett_samr_sid_pointer); } - offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, - dissect_ndr_nt_SID, NDR_POINTER_UNIQUE, - "SID", -1); + offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, + dissect_ndr_nt_SID_hf_through_ptr, NDR_POINTER_UNIQUE, + "SID pointer", hf_sid); proto_item_set_len(item, offset-old_offset); return offset; @@ -4381,9 +4387,9 @@ samr_dissect_add_alias_member_rqst(tvbuff_t *tvb, int offset, offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep, hf_samr_hnd, NULL, FALSE, FALSE); - offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, - dissect_ndr_nt_SID, NDR_POINTER_REF, - "SID:", -1); + offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, + dissect_ndr_nt_SID_no_hf, NDR_POINTER_REF, + "SID pointer", -1); return offset; } @@ -4407,9 +4413,10 @@ samr_dissect_remove_alias_member_rqst(tvbuff_t *tvb, int offset, offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep, hf_samr_hnd, NULL, FALSE, FALSE); - offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, - dissect_ndr_nt_SID, NDR_POINTER_REF, - "SID:", -1); + offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, + dissect_ndr_nt_SID_no_hf, NDR_POINTER_REF, + "SID pointer", -1); + return offset; } @@ -4499,9 +4506,10 @@ samr_dissect_remove_member_from_foreign_domain_rqst(tvbuff_t *tvb, int offset, offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep, hf_samr_hnd, NULL, FALSE, FALSE); - offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, - dissect_ndr_nt_SID, NDR_POINTER_REF, - "SID:", -1); + offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, + dissect_ndr_nt_SID_no_hf, NDR_POINTER_REF, + "SID pointer", -1); + return offset; } |