diff options
author | Guy Harris <guy@alum.mit.edu> | 2002-05-11 22:29:43 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2002-05-11 22:29:43 +0000 |
commit | 6a79ad7e918883e30576a20a4929489162f4cf62 (patch) | |
tree | 7a05d78e6c4ce46d7312603d18cbc3bb270b546a /packet-dcerpc-nt.c | |
parent | 3ffd657e1d7b069eed3afc0e0c7d9ccdd5a747f2 (diff) |
In "dissect_nt_policy_hnd()":
add arguments to specify whether the policy handle is being
opened or closed, and don't set the "open frame" for the handle
unless it's being opened and don't set the "close frame" for the
handle unless it's being closed;
store the policy handle before fetching it, so that an open or
close is marked appropriately in the protocol tree on the first
pass;
if the policy handle has a name associated with it, put that
name into the top-level item for the policy handle.
In "packet-dcerpc-spoolss.c":
get rid of aun unused variable;
make "setjob_commands[]" static, as it's not used outside
"packet-dcerpc-spoolss.c";
put a "VALS()" call around the reference to "setjob_commands",
to squelch compiler warnings;
give the SPOOLSS return code field the appropriate
"value_string" array.
svn path=/trunk/; revision=5448
Diffstat (limited to 'packet-dcerpc-nt.c')
-rw-r--r-- | packet-dcerpc-nt.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/packet-dcerpc-nt.c b/packet-dcerpc-nt.c index 87a9cb6f26..ac421c29b8 100644 --- a/packet-dcerpc-nt.c +++ b/packet-dcerpc-nt.c @@ -2,7 +2,7 @@ * Routines for DCERPC over SMB packet disassembly * Copyright 2001, Tim Potter <tpot@samba.org> * - * $Id: packet-dcerpc-nt.c,v 1.32 2002/05/09 02:44:22 tpot Exp $ + * $Id: packet-dcerpc-nt.c,v 1.33 2002/05/11 22:28:05 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -959,7 +959,7 @@ dissect_doserror(tvbuff_t *tvb, gint offset, packet_info *pinfo, int dissect_nt_policy_hnd(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, char *drep, int hfindex, - e_ctx_hnd *pdata) + e_ctx_hnd *pdata, gboolean is_open, gboolean is_close) { dcerpc_info *di = (dcerpc_info *)pinfo->private_data; proto_item *item; @@ -979,6 +979,16 @@ dissect_nt_policy_hnd(tvbuff_t *tvb, gint offset, packet_info *pinfo, offset = dissect_ndr_ctx_hnd(tvb, offset, pinfo, subtree, drep, hfindex, &hnd); + /* Store request/reply information */ + + if (di->request) { + dcerpc_smb_store_pol((const guint8 *)&hnd, NULL, 0, + is_close ? pinfo->fd->num : 0); + } else { + dcerpc_smb_store_pol((const guint8 *)&hnd, NULL, + is_open ? pinfo->fd->num: 0, 0); + } + /* Insert request/reply information if known */ if (dcerpc_smb_fetch_pol((const guint8 *)&hnd, &name, &open_frame, @@ -993,17 +1003,10 @@ dissect_nt_policy_hnd(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree_add_text(subtree, tvb, old_offset, sizeof(e_ctx_hnd), "Closed in frame %u", close_frame); + if (name != NULL) + proto_item_append_text(item, ": %s", name); } - /* Store request/reply information */ - - if (di->request) - dcerpc_smb_store_pol((const guint8 *)&hnd, NULL, 0, - pinfo->fd->num); - else - dcerpc_smb_store_pol((const guint8 *)&hnd, NULL, - pinfo->fd->num, 0); - if (pdata) *pdata = hnd; |