aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-05-11 22:29:43 +0000
committerGuy Harris <guy@alum.mit.edu>2002-05-11 22:29:43 +0000
commit6a79ad7e918883e30576a20a4929489162f4cf62 (patch)
tree7a05d78e6c4ce46d7312603d18cbc3bb270b546a
parent3ffd657e1d7b069eed3afc0e0c7d9ccdd5a747f2 (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
-rw-r--r--packet-dcerpc-lsa.c35
-rw-r--r--packet-dcerpc-nt.c25
-rw-r--r--packet-dcerpc-nt.h4
-rw-r--r--packet-dcerpc-samr.c130
-rw-r--r--packet-dcerpc-spoolss.c33
5 files changed, 134 insertions, 93 deletions
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 <tpot@samba.org>
* 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 <gerald@ethereal.com>
@@ -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);
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;
diff --git a/packet-dcerpc-nt.h b/packet-dcerpc-nt.h
index 7e440282b4..983a8dde87 100644
--- a/packet-dcerpc-nt.h
+++ b/packet-dcerpc-nt.h
@@ -2,7 +2,7 @@
* Routines for DCERPC over SMB packet disassembly
* Copyright 2001, Tim Potter <tpot@samba.org>
*
- * $Id: packet-dcerpc-nt.h,v 1.23 2002/05/09 02:44:22 tpot Exp $
+ * $Id: packet-dcerpc-nt.h,v 1.24 2002/05/11 22:28:05 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -163,7 +163,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);
int
dissect_nt_GUID(tvbuff_t *tvb, int offset,
diff --git a/packet-dcerpc-samr.c b/packet-dcerpc-samr.c
index b50a506664..d55e98fb6c 100644
--- a/packet-dcerpc-samr.c
+++ b/packet-dcerpc-samr.c
@@ -3,7 +3,7 @@
* Copyright 2001, Tim Potter <tpot@samba.org>
* 2002 Added all command dissectors Ronnie Sahlberg
*
- * $Id: packet-dcerpc-samr.c,v 1.44 2002/05/09 09:54:13 guy Exp $
+ * $Id: packet-dcerpc-samr.c,v 1.45 2002/05/11 22:28:05 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -330,7 +330,7 @@ samr_dissect_open_user_rqst(tvbuff_t *tvb, int offset, packet_info *pinfo,
guint32 rid;
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
hf_samr_access, NULL);
@@ -352,7 +352,7 @@ samr_dissect_open_user_reply(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
hf_samr_rc, NULL);
@@ -429,7 +429,7 @@ samr_dissect_query_dispinfo_rqst(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep,
hf_samr_level, NULL);
@@ -794,7 +794,7 @@ samr_dissect_get_display_enumeration_index_rqst(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep,
hf_samr_level, NULL);
@@ -856,7 +856,7 @@ samr_dissect_get_usrdom_pwinfo_rqst(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
return offset;
}
@@ -918,8 +918,11 @@ samr_dissect_connect2_reply(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
char *drep)
{
+ /*
+ * XXX - does this open the handle?
+ */
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, TRUE, FALSE);
offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
hf_samr_rc, NULL);
@@ -949,8 +952,11 @@ samr_dissect_connect_anon_reply(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
char *drep)
{
+ /*
+ * XXX - does this open the handle?
+ */
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, TRUE, FALSE);
offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
hf_samr_rc, NULL);
@@ -1036,7 +1042,7 @@ samr_dissect_get_groups_for_user_rqst(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
return offset;
}
@@ -1063,7 +1069,7 @@ samr_dissect_open_domain_rqst(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
hf_samr_access, NULL);
@@ -1079,7 +1085,7 @@ samr_dissect_open_domain_reply(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
hf_samr_rc, NULL);
@@ -1093,7 +1099,7 @@ samr_dissect_context_handle_SID(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
dissect_ndr_nt_SID, NDR_POINTER_REF,
@@ -1107,7 +1113,7 @@ samr_dissect_add_member_to_group_rqst(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
hf_samr_group, NULL);
@@ -1135,7 +1141,7 @@ samr_dissect_unknown_3c_rqst(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
return offset;
}
@@ -1160,7 +1166,7 @@ samr_dissect_create_alias_in_domain_rqst(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
samr_dissect_pointer_UNICODE_STRING, NDR_POINTER_REF,
@@ -1178,7 +1184,7 @@ samr_dissect_create_alias_in_domain_reply(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
hf_samr_rid, NULL);
@@ -1195,7 +1201,7 @@ samr_dissect_query_information_alias_rqst(tvbuff_t *tvb, int offset,
proto_tree *tree, char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep,
hf_samr_level, NULL);
@@ -1290,7 +1296,7 @@ samr_dissect_set_information_alias_rqst(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep,
hf_samr_level, NULL);
@@ -1343,7 +1349,7 @@ samr_dissect_oem_change_password_user2_rqst(tvbuff_t *tvb, int offset,
proto_tree *tree, char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
samr_dissect_pointer_STRING, NDR_POINTER_UNIQUE,
@@ -1377,7 +1383,7 @@ samr_dissect_unicode_change_password_user2_rqst(tvbuff_t *tvb, int offset,
proto_tree *tree, char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
samr_dissect_pointer_UNICODE_STRING, NDR_POINTER_UNIQUE,
@@ -1419,7 +1425,7 @@ samr_dissect_unknown_3b_rqst(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep,
hf_samr_unknown_short, NULL);
@@ -1449,7 +1455,7 @@ samr_dissect_create_user2_in_domain_rqst(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
samr_dissect_pointer_UNICODE_STRING, NDR_POINTER_REF,
@@ -1467,7 +1473,7 @@ samr_dissect_create_user2_in_domain_reply(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
hf_samr_unknown_long, NULL);
@@ -1485,7 +1491,7 @@ samr_dissect_get_display_enumeration_index2_rqst(tvbuff_t *tvb, int offset,
proto_tree *tree, char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep,
hf_samr_level, NULL);
@@ -1514,7 +1520,7 @@ samr_dissect_change_password_user_rqst(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_uint8 (tvb, offset, pinfo, tree, drep,
hf_samr_unknown_char, NULL);
@@ -1563,7 +1569,7 @@ samr_dissect_set_member_attributes_of_group_rqst(tvbuff_t *tvb, int offset,
proto_tree *tree, char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
hf_samr_attrib, NULL);
@@ -1659,7 +1665,7 @@ samr_dissect_query_information_group_rqst(tvbuff_t *tvb, int offset,
proto_tree *tree, char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep,
hf_samr_level, NULL);
@@ -1687,7 +1693,7 @@ samr_dissect_set_information_group_rqst(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep,
hf_samr_level, NULL);
@@ -1716,7 +1722,7 @@ samr_dissect_get_domain_password_information_rqst(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
samr_dissect_pointer_STRING, NDR_POINTER_UNIQUE,
@@ -1735,7 +1741,7 @@ samr_dissect_get_domain_password_information_reply(tvbuff_t *tvb, int offset,
* "samr_dissect_get_usrdom_pwinfo_reply()"?
*/
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
return offset;
}
@@ -1999,7 +2005,7 @@ samr_dissect_set_information_domain_rqst(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep,
hf_samr_level, NULL);
@@ -2025,7 +2031,7 @@ samr_dissect_lookup_domain_rqst(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
samr_dissect_pointer_UNICODE_STRING, NDR_POINTER_REF,
@@ -2241,7 +2247,7 @@ samr_dissect_get_alias_membership_rqst(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
dissect_ndr_nt_PSID_ARRAY, NDR_POINTER_REF,
@@ -2369,7 +2375,7 @@ samr_dissect_enum_domains_rqst(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
samr_dissect_pointer_long, NDR_POINTER_REF,
@@ -2408,7 +2414,7 @@ samr_dissect_enum_dom_groups_rqst(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
samr_dissect_pointer_long, NDR_POINTER_REF,
@@ -2448,7 +2454,7 @@ samr_dissect_enum_dom_aliases_rqst(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
samr_dissect_pointer_long, NDR_POINTER_REF,
@@ -2492,7 +2498,7 @@ samr_dissect_get_members_in_alias_rqst(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
return offset;
}
@@ -3169,7 +3175,7 @@ samr_dissect_set_information_user2_rqst(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep,
hf_samr_level, NULL);
@@ -3198,7 +3204,7 @@ samr_dissect_unknown_2f_rqst(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep,
hf_samr_level, NULL);
@@ -3364,7 +3370,7 @@ samr_dissect_set_sec_object_rqst(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
hf_samr_info_type, NULL);
@@ -3393,7 +3399,7 @@ samr_dissect_query_sec_object_rqst(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
hf_samr_info_type, NULL);
@@ -3455,7 +3461,7 @@ samr_dissect_lookup_names_rqst(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
hf_samr_count, NULL);
@@ -3525,7 +3531,7 @@ samr_dissect_lookup_rids_rqst(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
hf_samr_count, NULL);
@@ -3609,7 +3615,7 @@ samr_dissect_close_hnd_rqst(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, TRUE);
return offset;
}
@@ -3619,7 +3625,7 @@ samr_dissect_close_hnd_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
hf_samr_rc, NULL);
@@ -3677,7 +3683,7 @@ samr_dissect_remove_member_from_group_rqst(tvbuff_t *tvb, int offset,
proto_tree *tree, char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
hf_samr_group, NULL);
@@ -3727,7 +3733,7 @@ samr_dissect_add_alias_member_rqst(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
dissect_ndr_nt_SID, NDR_POINTER_REF,
@@ -3752,7 +3758,7 @@ samr_dissect_remove_alias_member_rqst(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
dissect_ndr_nt_SID, NDR_POINTER_REF,
@@ -3777,7 +3783,7 @@ samr_dissect_delete_dom_user_rqst(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
return offset;
}
@@ -3799,7 +3805,7 @@ samr_dissect_test_private_fns_domain_rqst(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
return offset;
}
@@ -3821,7 +3827,7 @@ samr_dissect_test_private_fns_user_rqst(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
return offset;
}
@@ -3844,7 +3850,7 @@ samr_dissect_remove_member_from_foreign_domain_rqst(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
dissect_ndr_nt_SID, NDR_POINTER_REF,
@@ -3872,7 +3878,7 @@ samr_dissect_remove_multiple_members_from_alias_rqst(tvbuff_t *tvb,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
dissect_ndr_nt_PSID_ARRAY, NDR_POINTER_REF,
@@ -3903,7 +3909,7 @@ samr_dissect_open_group_rqst(tvbuff_t *tvb, int offset, packet_info *pinfo,
guint32 rid;
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
hf_samr_access, NULL);
@@ -3925,7 +3931,7 @@ samr_dissect_open_group_reply(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
hf_samr_rc, NULL);
@@ -3942,7 +3948,7 @@ samr_dissect_open_alias_rqst(tvbuff_t *tvb, int offset, packet_info *pinfo,
guint32 rid;
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
hf_samr_access, NULL);
@@ -3964,7 +3970,7 @@ samr_dissect_open_alias_reply(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
hf_samr_rc, NULL);
@@ -3978,7 +3984,7 @@ samr_dissect_add_multiple_members_to_alias_rqst(tvbuff_t *tvb, int offset,
proto_tree *tree, char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
dissect_ndr_nt_PSID_ARRAY, NDR_POINTER_REF,
@@ -4004,7 +4010,7 @@ samr_dissect_create_group_in_domain_rqst(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
samr_dissect_pointer_UNICODE_STRING, NDR_POINTER_REF,
@@ -4022,7 +4028,7 @@ samr_dissect_create_group_in_domain_reply(tvbuff_t *tvb, int offset,
char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
hf_samr_rid, NULL);
@@ -4039,7 +4045,7 @@ samr_dissect_query_information_domain_rqst(tvbuff_t *tvb, int offset,
proto_tree *tree, char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep,
hf_samr_level, NULL);
@@ -4072,7 +4078,7 @@ samr_dissect_query_information_user_rqst(tvbuff_t *tvb, int offset,
proto_tree *tree, char *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_samr_hnd, NULL);
+ hf_samr_hnd, NULL, FALSE, FALSE);
offset = dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep,
hf_samr_level, NULL);
diff --git a/packet-dcerpc-spoolss.c b/packet-dcerpc-spoolss.c
index c0e8fc85f1..17d2507a45 100644
--- a/packet-dcerpc-spoolss.c
+++ b/packet-dcerpc-spoolss.c
@@ -2,7 +2,7 @@
* Routines for SMB \PIPE\spoolss packet disassembly
* Copyright 2001-2002, Tim Potter <tpot@samba.org>
*
- * $Id: packet-dcerpc-spoolss.c,v 1.27 2002/05/10 02:41:48 tpot Exp $
+ * $Id: packet-dcerpc-spoolss.c,v 1.28 2002/05/11 22:28:05 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -360,7 +360,8 @@ static int SpoolssClosePrinter_q(tvbuff_t *tvb, int offset,
/* Parse packet */
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_spoolss_hnd, &policy_hnd);
+ hf_spoolss_hnd, &policy_hnd,
+ FALSE, TRUE);
dcerpc_smb_fetch_pol((const guint8 *)&policy_hnd, &pol_name, 0, 0);
@@ -389,7 +390,8 @@ static int SpoolssClosePrinter_r(tvbuff_t *tvb, int offset,
/* Parse packet */
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_spoolss_hnd, NULL);
+ hf_spoolss_hnd, NULL,
+ FALSE, FALSE);
offset = dissect_doserror(tvb, offset, pinfo, tree, drep,
@@ -472,7 +474,8 @@ static int SpoolssGetPrinterData_q(tvbuff_t *tvb, int offset,
/* Parse packet */
offset = dissect_nt_policy_hnd(
- tvb, offset, pinfo, tree, drep, hf_spoolss_hnd, &policy_hnd);
+ tvb, offset, pinfo, tree, drep, hf_spoolss_hnd, &policy_hnd,
+ FALSE, FALSE);
offset = prs_struct_and_referents(tvb, offset, pinfo, tree,
prs_UNISTR2_dp, (void **)&value_name,
@@ -3094,7 +3097,6 @@ static int SpoolssEnumJobs_q(tvbuff_t *tvb, int offset, packet_info *pinfo,
{
dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
- const guint8 *policy_hnd;
guint32 level;
if (dcv->rep_frame != 0)
@@ -3104,7 +3106,8 @@ static int SpoolssEnumJobs_q(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* Parse packet */
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_spoolss_hnd, NULL);
+ hf_spoolss_hnd, NULL,
+ FALSE, FALSE);
offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
hf_spoolss_enumjobs_firstjob, NULL);
@@ -3194,7 +3197,7 @@ done:
#define JOB_CONTROL_RESTART 4
#define JOB_CONTROL_DELETE 5
-const value_string setjob_commands[] = {
+static const value_string setjob_commands[] = {
{ JOB_CONTROL_PAUSE, "Pause" },
{ JOB_CONTROL_RESUME, "Resume" },
{ JOB_CONTROL_CANCEL, "Cancel" },
@@ -3217,7 +3220,8 @@ static int SpoolssSetJob_q(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* Parse packet */
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_spoolss_hnd, NULL);
+ hf_spoolss_hnd, NULL,
+ FALSE, FALSE);
offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
hf_spoolss_jobid, &jobid);
@@ -3277,7 +3281,8 @@ static int SpoolssGetJob_q(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* Parse packet */
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_spoolss_hnd, NULL);
+ hf_spoolss_hnd, NULL,
+ FALSE, FALSE);
offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
hf_spoolss_jobid, &jobid);
@@ -3369,7 +3374,8 @@ static int SpoolssStartPagePrinter_q(tvbuff_t *tvb, int offset,
/* Parse packet */
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_spoolss_hnd, &policy_hnd);
+ hf_spoolss_hnd, &policy_hnd,
+ FALSE, FALSE);
dcerpc_smb_fetch_pol((const guint8 *)&policy_hnd, &pol_name, 0, 0);
@@ -3423,7 +3429,8 @@ static int SpoolssEndPagePrinter_q(tvbuff_t *tvb, int offset,
/* Parse packet */
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_spoolss_hnd, &policy_hnd);
+ hf_spoolss_hnd, &policy_hnd,
+ FALSE, FALSE);
dcerpc_smb_fetch_pol((const guint8 *)&policy_hnd, &pol_name, 0, 0);
@@ -3690,7 +3697,7 @@ proto_register_dcerpc_spoolss(void)
NULL, 0x0, "SPOOLSS policy handle", HFILL }},
{ &hf_spoolss_rc,
{ "Return code", "spoolss.rc", FT_UINT32, BASE_HEX,
- NULL, 0x0, "SPOOLSS return code", HFILL }},
+ VALS(DOS_errors), 0x0, "SPOOLSS return code", HFILL }},
{ &hf_spoolss_offered,
{ "Offered", "spoolss.offered", FT_UINT32, BASE_DEC,
NULL, 0x0, "Size of buffer offered in this request", HFILL }},
@@ -3796,7 +3803,7 @@ proto_register_dcerpc_spoolss(void)
{ &hf_spoolss_setjob_cmd,
{ "Set job command", "spoolss.setjob.cmd", FT_UINT32, BASE_DEC,
- &setjob_commands, 0x0, "Printer data name", HFILL }},
+ VALS(&setjob_commands), 0x0, "Printer data name", HFILL }},
};
static gint *ett[] = {