From 6a79ad7e918883e30576a20a4929489162f4cf62 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 11 May 2002 22:29:43 +0000 Subject: 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 --- packet-dcerpc-lsa.c | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) (limited to 'packet-dcerpc-lsa.c') diff --git a/packet-dcerpc-lsa.c b/packet-dcerpc-lsa.c index efa8ca9c6a..265ff72c8a 100644 --- a/packet-dcerpc-lsa.c +++ b/packet-dcerpc-lsa.c @@ -3,7 +3,7 @@ * Copyright 2001, Tim Potter * 2002 Added LSA command dissectors Ronnie Sahlberg * - * $Id: packet-dcerpc-lsa.c,v 1.46 2002/05/02 08:47:23 sahlberg Exp $ + * $Id: packet-dcerpc-lsa.c,v 1.47 2002/05/11 22:29:43 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -394,12 +394,37 @@ lsa_dissect_ACCESS_MASK(tvbuff_t *tvb, int offset, return offset; } +/* + * XXX - it'd be nice if we could arrange that this be passed + * some out-of-band indication of whether the handle is being opened, + * closed, or just used. + */ static int lsa_dissect_LSA_HANDLE(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, char *drep) { offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep, - hf_lsa_hnd, NULL); + hf_lsa_hnd, NULL, FALSE, FALSE); + + return offset; +} + +static int +lsa_dissect_LSA_HANDLE_open(tvbuff_t *tvb, int offset, + packet_info *pinfo, proto_tree *tree, char *drep) +{ + offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep, + hf_lsa_hnd, NULL, TRUE, FALSE); + + return offset; +} + +static int +lsa_dissect_LSA_HANDLE_close(tvbuff_t *tvb, int offset, + packet_info *pinfo, proto_tree *tree, char *drep) +{ + offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep, + hf_lsa_hnd, NULL, FALSE, TRUE); return offset; } @@ -455,7 +480,7 @@ lsa_dissect_lsaclose_rqst(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, char *drep) { offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, - lsa_dissect_LSA_HANDLE, NDR_POINTER_REF, + lsa_dissect_LSA_HANDLE_close, NDR_POINTER_REF, "LSA_HANDLE pointer: hnd", -1, 0); return offset; } @@ -509,7 +534,7 @@ lsa_dissect_lsaopenpolicy_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, char *drep) { offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, - lsa_dissect_LSA_HANDLE, NDR_POINTER_REF, + lsa_dissect_LSA_HANDLE_open, NDR_POINTER_REF, "LSA_HANDLE pointer: hnd", -1, 0); offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_lsa_rc, NULL); @@ -540,7 +565,7 @@ lsa_dissect_lsaopenpolicy2_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, char *drep) { offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, - lsa_dissect_LSA_HANDLE, NDR_POINTER_REF, + lsa_dissect_LSA_HANDLE_open, NDR_POINTER_REF, "LSA_HANDLE pointer: hnd", -1, 0); offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_lsa_rc, NULL); -- cgit v1.2.1