Commit Graph

89 Commits

Author SHA1 Message Date
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
Guy Harris dd8f630768 From Devin Heitmueller:
add MD4 and RC4 crypto support;

	use it to decrypt the NT password encryption block in
	UnicodeChangePassword2.

svn path=/trunk/; revision=6727
2002-12-03 00:37:27 +00:00
Guy Harris c6bcd3eb0d From Devin Heitmueller: show proper field names for SAMR
UnicodeChangePassword2.

svn path=/trunk/; revision=6603
2002-11-10 20:17:52 +00:00
Ronnie Sahlberg d8e1d2987a Bugfixes for two SAMR dissectors.
svn path=/trunk/; revision=6599
2002-11-10 09:49:38 +00:00
Richard Sharpe d49f9bf4d7 Add some fixes from Albert Chin
svn path=/trunk/; revision=6134
2002-08-30 02:08:50 +00:00
Jörg Mayer 7c4176d868 Removed trailing whitespaces from .h and .c files using the
winapi_cleanup tool written by Patrik Stridvall for the wine
project.

svn path=/trunk/; revision=6117
2002-08-28 21:04:11 +00:00
Tim Potter 50b37822a0 Some cleanups and fixes from Guy:
- combine proto_tree_add_text() and proto_tree_append_text() calls in the
   access mask dissector

 - make the specific access bits dissector functions return void instead of
   an offset

I think Samba has the create user reply wrong.  There is perhaps a uint32
marked as unknown that shouldn't be there.  Removing this parses all the
captures I have.

svn path=/trunk/; revision=6057
2002-08-22 01:13:13 +00:00
Tim Potter bc792aa9a4 Call dissect_nt_access_mask() instead of dissect_ndr_uint32()
svn path=/trunk/; revision=6054
2002-08-21 21:31:15 +00:00
Tim Potter 5770e384a0 The unknown uint32 in create user2 reply is an access granted mask.
Assign some names to policy handles generated by open/create domain/user/group.

svn path=/trunk/; revision=5987
2002-08-13 07:59:33 +00:00
Tim Potter f92f7de8e3 Fix a return code in samr_dissect_query_information_domain_reply()
svn path=/trunk/; revision=5965
2002-08-07 01:04:51 +00:00
Richard Sharpe fc7030bc24 Update packet-dcerpc-samr.{c,h} to fix the names for the functions we now
know are SamrConnect, SamrConnect2, SamrConnect3 and SamrConnect4.

Thanks to Jim McDonnough and Tod Sabin.

svn path=/trunk/; revision=5960
2002-08-06 21:58:09 +00:00
Guy Harris ff49944dcd From Joerg Mayer: add #includes of "snprintf.h" in modules that used
"snprintf()" but weren't including "snprintf.h".

svn path=/trunk/; revision=5887
2002-07-16 22:50:48 +00:00
Richard Sharpe c4e5391585 A small patch from Andrew Bartlett.
svn path=/trunk/; revision=5826
2002-07-06 17:44:47 +00:00
Tim Potter 4f61c39615 Fix up is_open and is_close arguments to dissect_nt_policy_hnd
calls in SAMR dissector.

svn path=/trunk/; revision=5809
2002-07-02 02:33:07 +00:00
Tim Potter 6d6dce305d Change each DCERPC dissector to pass in a hf value on initialisation
for a value_string that corresponds to that dissectors opnums.  Pass
in -1 if no such table is available.

svn path=/trunk/; revision=5749
2002-06-24 00:03:18 +00:00
Tim Potter 501daf1770 Removed some trailing commas from various DCERPC dissectors.
svn path=/trunk/; revision=5604
2002-05-31 00:31:13 +00:00
Ronnie Sahlberg 259903dc66 Changed toplevel REF pointer dissection to create a subtree. Not creating a subtree was a design mistake which caused ugliness in the unicode string str dissector and in other places.
Dissectors will temporarily have less pretty output for topleve ref pointers until their output is retuned.

svn path=/trunk/; revision=5573
2002-05-27 09:50:58 +00:00
Guy Harris 6a79ad7e91 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
2002-05-11 22:29:43 +00:00
Guy Harris 5f3ec8a741 Put in a comment noting that the previous change came from a real
capture, so if an IDL disagrees, the IDL is wrong.

svn path=/trunk/; revision=5428
2002-05-09 09:54:13 +00:00
Guy Harris 94f3f3479e As Ronnie Sahlberg notes, the problem is that the QueryDomainInfo
response starts with a UNIQUE pointer to a DOMAIN_INFO, not with a REF
pointer to a DOMAIN_INFO - and also not with a UNIQUE pointer to a
DOMAIN_INFO REF pointer; fix the code to match that.

svn path=/trunk/; revision=5427
2002-05-09 09:49:34 +00:00
Guy Harris c5312df095 In at least one capture, a QueryDomainInfo response starts with what is,
I guess, a UNIQUE pointer to a DOMAIN_INFO REF pointer; dissect it as
such.

svn path=/trunk/; revision=5426
2002-05-09 08:36:45 +00:00
Ronnie Sahlberg dad31088e2 Several bugfixes for SAMR
svn path=/trunk/; revision=5413
2002-05-07 11:26:46 +00:00
Tim Potter afa61bda6e Remove unused function.
Dissect a status code at the end of GetAliasMem reply instead of uint32.

svn path=/trunk/; revision=5401
2002-05-05 23:48:19 +00:00