diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2002-04-17 15:11:30 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2002-04-17 15:11:30 +0000 |
commit | 1e24ac236f914fa1ec28fb21374be69610ede1c1 (patch) | |
tree | 8ded2670ae9d387a8110c93413833d702c3cd0a7 /packet-smb.c | |
parent | b6bde1d15095bb2203136ecb41193ca8e6f58741 (diff) |
Bugfixes for LSA dissector and a small change to the security_descriptor dissector in packet-smb.c so we can call it from DCERPC NDR encoded services.
svn path=/trunk/; revision=5194
Diffstat (limited to 'packet-smb.c')
-rw-r--r-- | packet-smb.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/packet-smb.c b/packet-smb.c index c654528a5f..f647836db2 100644 --- a/packet-smb.c +++ b/packet-smb.c @@ -3,7 +3,7 @@ * Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com> * 2001 Rewrite by Ronnie Sahlberg and Guy Harris * - * $Id: packet-smb.c,v 1.242 2002/04/16 02:42:24 guy Exp $ + * $Id: packet-smb.c,v 1.243 2002/04/17 15:11:30 sahlberg Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -6928,7 +6928,12 @@ dissect_nt_sec_desc_type(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tr return offset; } - +/* this function is also called from DCREPC services and then the NDR syntax must be followed. + we assume that owner SID , group SID, SACL DACL objects are always stored in order (when present) + and that all of them are aligned on a 4 byte boundary. + We no longer use the xxx_offset other than to check that they are non-NULL to be compatible with + DCERPC NDR Unique pointer handling. + len is no longer used and should be removed */ int dissect_nt_sec_desc(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent_tree, int len) { @@ -6942,7 +6947,7 @@ dissect_nt_sec_desc(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *p guint32 dacl_offset; if(parent_tree){ - item = proto_tree_add_text(parent_tree, tvb, offset, len, + item = proto_tree_add_text(parent_tree, tvb, offset, 0, "NT Security Descriptor"); tree = proto_item_add_subtree(item, ett_smb_sec_desc); } @@ -6980,27 +6985,28 @@ dissect_nt_sec_desc(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *p /*owner SID*/ if(owner_sid_offset){ - dissect_nt_sid(tvb, pinfo, old_offset+owner_sid_offset, tree, "Owner"); + offset = dissect_nt_sid(tvb, pinfo, offset, tree, "Owner"); } /*group SID*/ if(group_sid_offset){ - dissect_nt_sid(tvb, pinfo, old_offset+group_sid_offset, tree, "Group"); + offset = dissect_nt_sid(tvb, pinfo, offset, tree, "Group"); } /* sacl */ if(sacl_offset){ - dissect_nt_acl(tvb, pinfo, old_offset+sacl_offset, tree, "System (SACL)"); + offset = dissect_nt_acl(tvb, pinfo, offset, tree, "System (SACL)"); } /* dacl */ if(dacl_offset){ - dissect_nt_acl(tvb, pinfo, old_offset+dacl_offset, tree, "User (DACL)"); + offset = dissect_nt_acl(tvb, pinfo, offset, tree, "User (DACL)"); } } - return offset+len; + proto_item_set_len(item, offset-old_offset); + return offset; } static int |