Commit Graph

111 Commits

Author SHA1 Message Date
Guy Harris de2a2077b8 From Jean-Baptiste Marchand: many small fixes for the samr dissector,
based on test trafic generated with Samba 4 smbtorture utility and Samba
4 samr.idl.

svn path=/trunk/; revision=11257
2004-06-28 05:54:35 +00:00
Guy Harris a43ec4bd7d From Jean-Baptiste Marchand: dissect the USER_INFO_25 samr structure
(used by Windows XP clients when joining a domain managed by a W2K3
domain controller).

svn path=/trunk/; revision=11243
2004-06-26 03:40:12 +00:00
Ronnie Sahlberg 0f1f4361c6 from JBM updates to SAMR CONNECTx
svn path=/trunk/; revision=11224
2004-06-24 05:23:47 +00:00
Ronnie Sahlberg 1f30a1a71c from JBM: updates to SAMR and LSA
svn path=/trunk/; revision=11113
2004-06-05 02:40:23 +00:00
Tim Potter 1703faf299 Remove hf argument to common routines for dissecting domain sids. Most
of the callers passed -1 for this parameter anyway.

svn path=/trunk/; revision=10919
2004-05-19 04:52:31 +00:00
Tim Potter 7e7d7ab15a Move common routines from packet-dcerpc-samr.c to packet-dcerpc-nt.c
svn path=/trunk/; revision=10903
2004-05-15 10:05:09 +00:00
Richard Sharpe fc71b11d56 Add the mask for an NT ACL ACE to the summary list for each ACE. This
means we don't have to expand the ACE to see what the permission mask is.

There are a couple of other places where this could be used, but I have not
done anything about them.

svn path=/trunk/; revision=10515
2004-03-30 07:39:05 +00:00
Guy Harris f0ae07f685 From Ronnie Sahlberg: small fix to prevent dereferencing null pointers.
svn path=/trunk/; revision=10464
2004-03-23 18:44:51 +00:00
Jörg Mayer 3e2633a0f4 char *drep -> guint8 *drep
svn path=/trunk/; revision=9735
2004-01-19 20:10:37 +00:00
Tim Potter 5d483e957e More operation names updates from Jean-Baptiste Marchand.
svn path=/trunk/; revision=8564
2003-09-29 00:01:27 +00:00
Ronnie Sahlberg 3eb20bc78b From JBM
Update all names for SAMR and LSA functions so they match the function names
in the API

svn path=/trunk/; revision=8516
2003-09-23 12:06:20 +00:00
Tim Potter 4ccbfa3edc Guy suggested that the dcerpc opnum value_string code could be simplified
somewhat.  Now the dynamic initialisation of the value_string is contained
in the value_string_from_subdissectors() function instead of being
distributed amongst the dcerpc dissectors.

svn path=/trunk/; revision=8123
2003-08-04 02:49:04 +00:00
Guy Harris 47f684014c From Jean-Baptiste Marchand: add descriptions of permissions for
SAM_SERVER and SAM_USER objects in SAMR.

svn path=/trunk/; revision=8080
2003-07-24 20:33:22 +00:00
Tim Potter 6b9461a08b Removed unused local variable.
svn path=/trunk/; revision=8022
2003-07-15 01:37:27 +00:00
Richard Sharpe c54f58c798 Fix the decoding of SIDs and Attributes so that a SamLogon response with extra
SIDs can be dissected properly. However, I am not sure if this affects anything
else.

svn path=/trunk/; revision=8020
2003-07-14 19:51:42 +00:00
Tim Potter 623f5b865d Dynamically create DCERPC opnum value_strings from the subdissector
list rather than duplicating this information in the dissector.  Some
of the opnum strings were starting to get out of date as developers
forgot to update the information in both places.

svn path=/trunk/; revision=7936
2003-06-26 04:30:31 +00:00
Guy Harris ef77cb578a In the policy handle hashing, handle more than one policy handle having
the same value, as an open might return handle XXX, handle XXX might
then be closed, and a subsequent handle might return handle XXX, and we
want to keep the two handles distinct to avoid, for example, displaying
handles closed before they're opened.

In policy handle open replies, store the handle name only if the
operation succeeded.  We can now do that without parsing the packet
twice.

Have "dissect_nt_policy_hnd()" optionally return, through a pointer, the
protocol tree item for the handle, so that its caller can decorate the
item with the name of the handle - that's done on opens, where we do
that only if the operation succeeds.

svn path=/trunk/; revision=7787
2003-06-05 04:22:04 +00:00
Ronnie Sahlberg 63884147dd Update SAMR to change the last few calls to dissect a context handle to
use dissect_nt_policy_hnd() instead.

svn path=/trunk/; revision=7766
2003-05-30 23:44:13 +00:00
Guy Harris 540345e8c1 Fix typoes.
svn path=/trunk/; revision=7750
2003-05-27 07:44:54 +00:00
Ronnie Sahlberg e6359f68ee remove unused include that was added by mistake
svn path=/trunk/; revision=7714
2003-05-22 11:58:54 +00:00
Ronnie Sahlberg 5feaba4955 make dissect_nt_sid() return a sid string that also contains the proper name for the sid.
this prettifies some dcerpc interfaces

svn path=/trunk/; revision=7712
2003-05-22 11:32:06 +00:00
Ronnie Sahlberg 75f18ecfee Make one QIP infolevel specify a sid hf field and update the embryonic sid snooping framework to handle the new hw name
svn path=/trunk/; revision=7709
2003-05-21 10:39:19 +00:00
Ronnie Sahlberg 14f5d761c1 Change the interface to dissect_nt_sid so that we can provide a hf field to use
to describe the sid instead of the default smb.sid one

svn path=/trunk/; revision=7708
2003-05-21 10:16:10 +00:00
Ronnie Sahlberg 8271c6a106 Change the interface to dissect_ndr_nt_SID to take the extra parameter hf_sid
if the caller wants something else instead of "smb.sid"

svn path=/trunk/; revision=7707
2003-05-21 10:06:29 +00:00
Ronnie Sahlberg 1cedc6aab9 Change the interface to dissect_ndr_nt_PSID to take one extra parameter which if !=-1 is a hf field for the sid to use instead of the default smb.sid one.
svn path=/trunk/; revision=7706
2003-05-21 09:34:54 +00:00
Tim Potter cabe2eebf8 More work on dissecting generic and standard mappings for NT access masks.
svn path=/trunk/; revision=7668
2003-05-15 02:14:00 +00:00
Tim Potter e3dabb27e2 Move the specific rights dissection function and name into a structure
instead of passing them around as separate parameters.  This is a
prelude to adding generic and standard mapping to the access mask
dissection.

svn path=/trunk/; revision=7591
2003-04-28 04:44:54 +00:00
Ronnie Sahlberg bca3332efd Not all strings in MS interfaces are unicode.
Rename cb_str_postprocess which handles unicode strings to cb_wstr_postprocess.

Add cb_str_postprocess which handles ASCII strings

svn path=/trunk/; revision=7572
2003-04-27 00:49:14 +00:00
Tim Potter 795926735d When dissecting specific rights, pass a name string down so the
proto item says "foo specific rights" instead of just "specific
rights".

svn path=/trunk/; revision=7401
2003-04-03 05:43:59 +00:00
Guy Harris 569e74a1f3 When registering a string preference, if the value of the preference is
NULL, convert it to a copy of a null string, otherwise replace it with a
copy of the string, so that we know that the variable for the preference
always points to a string that can be freed.

That also obviates the need to worry about a null-pointer value for a
preference variable when checking to see whether a preference has changed.

When checking for a string preference not being set, check for an empty
string, not a null pointer - the above code turns null pointers into
pointers to empty strings, *and* the GUI code does (and always did!) the
same.

svn path=/trunk/; revision=7342
2003-03-11 22:51:52 +00:00
Tim Potter fc71b17968 hf_samr_mask is actually an nt_acct_ctrl.
svn path=/trunk/; revision=7193
2003-02-25 02:03:11 +00:00
Tim Potter a0684a7fd2 Forgot to rename constant for bit 0x80 of SAMR domain handle permissions.
svn path=/trunk/; revision=7180
2003-02-21 02:04:31 +00:00
Tim Potter 5ef6684a97 Apparently bit 0x80 of a SAMR domain handle is the permission to look
up alias members.

svn path=/trunk/; revision=7178
2003-02-21 00:19:02 +00:00
Guy Harris 46f4c41529 Don't try to put the policy handle name into the Info column if we don't
have a policy handle name.

svn path=/trunk/; revision=7173
2003-02-19 22:09:03 +00:00
Tim Potter a351c970c6 Display the policy handle name in COL_INFO for the ClosePolicy RPC.
Change the policy names slightly so they look nicer.

svn path=/trunk/; revision=7148
2003-02-14 06:19:54 +00:00
Guy Harris 64991e3fa1 Have "dissect_ndr_counted_string()" add 2, not 1, to its argument, as it
adds 2 levels to the tree.  Fix calls to it not to add 1 for that level.

The NT and LM challenges in a NETWORK_INFO structure are opaque arrays
of bytes, not Unicode strings; dissect them as such, adding a new
routine "dissect_ndr_counted_byte_array()" for that purpose.

Get rid of some extra colons in names - the colon is put there if a
string is appended, so putting a colon in there explicitly gives double
colons.

Decorate some higher-level tree nodes with strings.

svn path=/trunk/; revision=7107
2003-02-08 09:41:44 +00:00
Guy Harris e9f0f4b74f Rename "dissect_ndr_char_string()" and "dissect_ndr_wchar_string()" to
"dissect_ndr_char_cvstring()" and "dissect_ndr_wchar_cvstring()", to
indicate that they're for conformant varying strings.

Rename "dissect_ndr_character_array()" to "dissect_ndr_cvstring()", to
indicate that it's for conformant varying strings.

svn path=/trunk/; revision=7096
2003-02-07 22:44:54 +00:00
Guy Harris 9a348d5736 Rename "dissect_ndr_char_array" and "disect_ndr_wchar_array" to
"dissect_ndr_char_string" and "dissect_ndr_wchar_string", to make it
clearer what it does.

svn path=/trunk/; revision=7095
2003-02-07 22:31:32 +00:00
Guy Harris 09052b88d2 Decorate several layers of the tree with the account name in
"USER_INFO_21" and in "LOOKUP_NAMES".

svn path=/trunk/; revision=7090
2003-02-07 08:37:13 +00:00
Tim Potter 6b8a47a691 Convert to new DCERPC string handling functions. There are still some
cosmetic bugs to work out though.

svn path=/trunk/; revision=7069
2003-02-03 02:14:01 +00:00
Guy Harris 48c7ab1f05 Decorate one level up with the string in
"samr_dissect_pointer_UNICODE_STRING()".

Put in a comment asking why that routine exists.

svn path=/trunk/; revision=7067
2003-02-02 22:47:46 +00:00
Tim Potter 36ad9c9ecd The handle returned by the OpenDomain RPC now has the SID in the handle
name.

Made OpenGroup and CreateGroup handle names contain appropriate RID values.

Added some more COL_INFO bits & pieces (info levels etc).

svn path=/trunk/; revision=7055
2003-01-31 04:18:08 +00:00
Guy Harris 5dc66497b7 Generalize "cb_str_postprocess()" to allow the string to be appended to
items N levels up from the item being processed, and use that to
decorate the tree as it was decorated before.

svn path=/trunk/; revision=7043
2003-01-30 08:19:39 +00:00
Tim Potter 497042348b Display random useful tidbits in COL_INFO.
svn path=/trunk/; revision=7040
2003-01-30 05:38:56 +00:00
Tim Potter 1d6acba45c Convert dissector to callback based version of dissect_ndr_pointer().
Strings that used to call with levels != -1 should call the
callback helper which will append the string to the pointer item.

svn path=/trunk/; revision=7017
2003-01-28 06:39:41 +00:00
Guy Harris 6e57154948 Put Unicode strings into the protocol tree with the appropriate protocol
tree item, not with hf_nt_str.  Get rid of hf_nt_str, as it's no longer
used.

Put ASCII strings into the protocol tree only once.

svn path=/trunk/; revision=6910
2003-01-11 08:22:39 +00:00
Guy Harris 62c48557e5 Get rid of an extra "." at the end of the name of the "nt.str" field.
svn path=/trunk/; revision=6908
2003-01-11 07:48:22 +00:00
Tim Potter 56b60052cd Convert some incidental prs_* calls to dissect_dcerpc_*
equivalents.

svn path=/trunk/; revision=6898
2003-01-11 04:35:57 +00:00
Guy Harris 69ab206a89 From Devin Heitmueller: make the RC4 support stateful.
svn path=/trunk/; revision=6777
2002-12-11 19:31:02 +00:00
Guy Harris 6005765a80 Values in Microsoft protocols that don't have their byte order specified
by DCE RPC are usually little-endian; fix a bunch of
"proto_tree_add_item()" calls (most are for byte-array or string fields,
so the byte order doesn't make a difference, but one is a number).

Put an item into the protocol tree for the encrypted NT password block.

Mallocate the buffer for the Unicode version of the password, rather
than assuming it'll fit in 256 bytes.

"g_malloc()" never returns NULL - it either allocates memory or aborts -
so don't check for a mallocation failure.

Don't try to decrypt the NT password block if we don't have a password.

svn path=/trunk/; revision=6731
2002-12-03 01:20:56 +00:00