aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/dissectors/packet-dcerpc-nt.c21
-rw-r--r--epan/packet.c1
-rw-r--r--epan/packet_info.h3
3 files changed, 24 insertions, 1 deletions
diff --git a/epan/dissectors/packet-dcerpc-nt.c b/epan/dissectors/packet-dcerpc-nt.c
index 1e6a9cedea..e7d794203e 100644
--- a/epan/dissectors/packet-dcerpc-nt.c
+++ b/epan/dissectors/packet-dcerpc-nt.c
@@ -944,12 +944,31 @@ PIDL_dissect_policy_hnd(tvbuff_t *tvb, gint offset, packet_info *pinfo,
proto_tree *tree, guint8 *drep, int hfindex,
guint32 param)
{
+ e_ctx_hnd policy_hnd;
+ dcerpc_info *di;
+
+ di=pinfo->private_data;
+
offset=dissect_nt_hnd(tvb, offset, pinfo,
tree, drep, hfindex,
- NULL, NULL,
+ &policy_hnd, NULL,
param&PIDL_POLHND_OPEN, param&PIDL_POLHND_CLOSE,
HND_TYPE_CTX_HANDLE);
+ /* If this was an open/create and we dont yet have a policy name
+ * then create one.
+ * XXX We do not yet have the infrastructure to know the name of the
+ * actual object so just show it as <...> for the time being.
+ */
+ if((param&PIDL_POLHND_OPEN)
+ && !pinfo->fd->flags.visited
+ && !di->conformant_run){
+ char *pol_name=NULL;
+
+ pol_name=ep_strdup_printf("%s(<...>)", pinfo->dcerpc_procedure_name);
+ dcerpc_smb_store_pol_name(&policy_hnd, pinfo, pol_name);
+ }
+
return offset;
}
diff --git a/epan/packet.c b/epan/packet.c
index 8b039fbe9a..d6d2dc5d19 100644
--- a/epan/packet.c
+++ b/epan/packet.c
@@ -313,6 +313,7 @@ dissect_packet(epan_dissect_t *edt, union wtap_pseudo_header *pseudo_header,
edt->pi.profinet_type = 0;
edt->pi.usb_conv_info = NULL;
edt->pi.tcp_tree = NULL;
+ edt->pi.dcerpc_procedure_name="";
TRY {
edt->tvb = tvb_new_real_data(pd, fd->cap_len, fd->pkt_len);
diff --git a/epan/packet_info.h b/epan/packet_info.h
index 46633e992a..ea81ea2374 100644
--- a/epan/packet_info.h
+++ b/epan/packet_info.h
@@ -176,6 +176,9 @@ typedef struct _packet_info {
guint16 profinet_type; /* the type of PROFINET packet (0: not a PROFINET packet) */
void *usb_conv_info;
void *tcp_tree; /* proto_tree for the tcp layer */
+
+ char *dcerpc_procedure_name; /* Used by PIDL to store the name of the current dcerpc procedure */
+
} packet_info;
#endif /* __PACKET_INFO_H__ */