1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-21 12:23:50 +03:00
Commit Graph

419 Commits

Author SHA1 Message Date
Tim Potter
40d49d6279 r4841: Handle levels that are signed integer types. 2007-10-10 13:09:00 -05:00
Tim Potter
f2ce80e335 r4815: Handle uint8 and uint16 bitmap types.
Break out arguments to proto_register_protocol() so they can be renamed
easily.  Unfortunately the "pidl_" prefix will have to stick around if/when
the old dissectors are removed because the filter and short names clash.
2007-10-10 13:08:58 -05:00
Tim Potter
2c0e77869f r4798: When dissecting structures, name the protocol tree after the field name,
not the field type (i.e DACL and SACL instead of dom_sid).
2007-10-10 13:08:56 -05:00
Tim Potter
6fc162738f r4797: Add the name of what we are pointing to when dissecting pointers. 2007-10-10 13:08:56 -05:00
Tim Potter
2950dbd87c r4796: Get rid of unecessary #include 2007-10-10 13:08:56 -05:00
Tim Potter
fd14622d13 r4773: Handle arrays of scalar types as function arguments.
Add hf for function return value.

Rename struct field members to be named after the structure name
and element name rather than element name and element type.

Remember which structure or function we are processing and use it
to generate hf fields according to the naming scheme above.
2007-10-10 13:08:53 -05:00
Tim Potter
b2a3b02216 r4771: Fix some indentation. 2007-10-10 13:08:52 -05:00
Tim Potter
75b6df15f2 r4770: Change from processing ndr_*.[ch] files all at once to line-by-line.
I'm hoping this will allow better mapping hf fields to the structures
they are present in which isn't possible at the moment.  (Line mode
allows us to use /foo/ .. /bar/ regexps and to store state during the
processing.
2007-10-10 13:08:52 -05:00
Stefan Metzmacher
f0a0dbeb25 r4690: - add support for async rpc server replies
the backend should check for
(dce_call->state_flags & DCESRV_CALL_STATE_FLAG_MAY_ASYNC)
then it's allowed to reply async

then the backend should mark that call as async with
dce_call->state_flags |= DCESRV_CALL_STATE_FLAG_ASYNC;

later it has to manualy set r->out.result
and then send the reply by calling

status = dcesrv_reply(p->dce_call);

NOTE: that ncacn_np doesn't support async replies yet

- implement an async version of echo_TestSleep

- reenable the echo_TestSleep torture test
  (this need to be more strict when we have support for async ncacn_np)

metze
2007-10-10 13:08:43 -05:00
Stefan Metzmacher
b467635c2d r4677: stub.pm must be synced with server.pm
metze
2007-10-10 13:08:41 -05:00
Andrew Bartlett
1fed79cb0f r4673: Fix the IDL for the QuerySecret LSA call.
This call uses a new IDL type, NTTIME_hyper.  This is 8-byte aligned,
as the name suggests.

Expand the QuerySecret LSA calls in RPC-SAMLOGON and RPC-LSA, to
validate the behaviour of times, and of the old secrets.

Thanks to tridge for spotting the use of HYPER!

Andrew Bartlett
2007-10-10 13:08:40 -05:00
Andrew Tridgell
fde042b3fc r4640: first stage in the server side support for multiple context_ids on one pipe
this stage does the following:

 - simplifies the dcerpc_handle handling, and all the callers of it

 - split out the context_id depenent state into a linked list of established contexts

 - fixed some talloc handling in several rpc servers that i noticed while doing the above
2007-10-10 13:08:38 -05:00
Stefan Metzmacher
64805e5dc5 r4637: log packets when the server code returns an DCERPC_FAULT
metze
2007-10-10 13:08:37 -05:00
Jelmer Vernooij
1f8f4dd179 r4624: Several crash fixes for DCOM
More work on the example class implementation
2007-10-10 13:08:35 -05:00
Andrew Tridgell
4004c69937 r4616: the first phase in the addition of proper support for
dcerpc_alter_context and multiple context_ids in the dcerpc client
library.

This stage does the following:

 - split "struct dcerpc_pipe" into two parts, the main part being "struct dcerpc_connection", which
   contains all the parts not dependent on the context, and "struct dcerpc_pipe" which has
   the context dependent part. This is similar to the layering in libcli_*() for SMB

 - disable the current dcerpc_alter code. I've used a #warning until i
   get the 2nd phase finished. I don't know how portable #warning is, but
   it won't be long before I add full alter context support anyway, so it won't last long

 - cleanup the allocation of dcerpc_pipe structures. The previous code
   was quite awkward.
2007-10-10 13:08:34 -05:00
Tim Potter
20f9143221 r4613: Fix stuff I broke in the last commit with the /x regexp flag. 2007-10-10 13:08:33 -05:00
Tim Potter
c325859eb6 r4606: Start adding some more comments and some indentation for the eparser
regexps.  Hopefully this will make things a bit easier to understand
later on.
2007-10-10 13:08:32 -05:00
Tim Potter
25f6e11f31 r4600: Remove Data::Dumper import leftover from debugging.
Return more ethereal types and bases for hf fields.  Currently we
assume that enums always fit into a uint16 which will probably  have to
change soon.
2007-10-10 13:08:32 -05:00
Tim Potter
d39cb7ecb4 r4599: Remove some duplicated code in pidl.pl.
Start working on adding support for bitmaps and enums.

In progress tweaks for arrays of structures.
2007-10-10 13:08:32 -05:00
Tim Potter
0f8f0de00f r4578: Minor cleanup of ndr_pull_array() and ndr_pull_array_foo() regexps. 2007-10-10 13:08:29 -05:00
Stefan Metzmacher
c3b2d2cca3 r4557: support for [flags()] on typedef enum|bitmap
NDR_PAHEX is handled by ndr_print_enum() now

metze
2007-10-10 13:08:27 -05:00
Andrew Tridgell
ec70d9a740 r4556: neater (and faster) way of doing alignments and scalars 2007-10-10 13:08:27 -05:00
Stefan Metzmacher
6f75a06b86 r4553: fix typo
metze
2007-10-10 13:08:26 -05:00
Stefan Metzmacher
a8d61aa473 r4551: add support for a pidl extensions
'declare bitmap foo1;'
'declare enum foo2;'

and also allow

typedef [public] bitmap ...
typedef [public] enum ...

you need to a forward declaration of bitmaps and enums

when you want to use them in another idl file,
and you need to make the real declaration to be public

see the next commit to samr.idl and netlogon.idl

metze
2007-10-10 13:08:26 -05:00
Andrew Tridgell
89b74b5354 r4549: got rid of a lot more uses of plain talloc(), instead using
talloc_size() or talloc_array_p() where appropriate.

also fixed a memory leak in pvfs_copy_file() (failed to free a memory
context)
2007-10-10 13:08:25 -05:00
Tim Potter
9eeb976773 r4548: Convert to talloc_p() and talloc_array_p() where appropriate.
(swig stuff seems broken atm though)
2007-10-10 13:08:25 -05:00
Stefan Metzmacher
2f3aea72ee r4540: sync enum and bitmap code
metze
2007-10-10 13:08:19 -05:00
Stefan Metzmacher
052a7d4f9a r4535: add full support for
typedef bitmap {
    FLAG1 = 0x01
} fooflags;

typedef struct {
    fooflags flags;
}

metze
2007-10-10 13:08:19 -05:00
Stefan Metzmacher
afef9b1048 r4534: update the yapp generated code
metze
2007-10-10 13:08:19 -05:00
Stefan Metzmacher
192f249546 r4533: parsing support for:
typedef [bitmap16bit] bitmap {
	FLAG1 = 0x0001,
	FLAG2 = 0x8000
} fooflags;

metze
2007-10-10 13:08:19 -05:00
Andrew Tridgell
1a24a50384 r4526: - much simpler (and more accurate!) ndr_size_*() code generation. It
is less efficient, but I really doubt that matters.

- use enum in epmapper.idl for protocol type

- added support for "enum8bit" flag, used in epmapper.idl
2007-10-10 13:08:18 -05:00
Andrew Tridgell
0939b83a0f r4523: the PROPERTIES change for typedef was not quite as simple as I thought. This puts in a workaround
that fixes things for now
2007-10-10 13:08:18 -05:00
Andrew Tridgell
73d5a033e8 r4522: PROPERTIES are now handled at the typedef level 2007-10-10 13:08:18 -05:00
Andrew Tridgell
dee8eff259 r4521: fixed up the handling of PROPERTIES elements after the change to support enum 2007-10-10 13:08:18 -05:00
Andrew Tridgell
1852033f2e r4518: added proper support for "typedef enum" in pidl. We can now use enums as types in switch
statements and variable types, and the value will be printed with its string name and value
2007-10-10 13:08:17 -05:00
Tim Potter
6e480fab3a r4517: Revert previous commit about giving arrays of scalars their own subtree.
Generate code to display using proto_tree_add_bytes() instead.
2007-10-10 13:08:17 -05:00
Tim Potter
b943213095 r4512: Give arrays of scalar types their own subtree. 2007-10-10 13:08:17 -05:00
Tim Potter
0f50ed8260 r4511: Remove a crapload of dead code. 2007-10-10 13:08:17 -05:00
Tim Potter
60f266bf6a r4509: Add missing cr. 2007-10-10 13:08:16 -05:00
Tim Potter
9f99d94ff5 r4495: Some more regexps for handling stuff in the lsa and samr pipes -
various types of arrays and relative structures.
2007-10-10 13:08:12 -05:00
Tim Potter
446b2cf996 r4489: Remove an obsolete file. 2007-10-10 13:08:12 -05:00
Andrew Tridgell
973acf7bbd r4480: autofree the dcom proxy tables 2007-10-10 13:08:10 -05:00
Tim Potter
7007522f83 r4469: Version n + 1 of the pidl ethereal parser generator. This version is
based on the idea of manipulating the .c and .h files generated by
parser.pm with perl regexps and glueing it all together to make an
ethereal plugin.

I thought this was a pretty crazy idea to start off with but it has
turned out to be not as complicated as I thought and has the huge advantage
of not duplicating any of the difficult code in parser.pm.
2007-10-10 13:07:54 -05:00
Tim Potter
1fe95ad172 r4468: Don't be a slacker and leave out parameter names when generating
prototypes for ndr push/pull/print functions.
2007-10-10 13:07:54 -05:00
Stefan Metzmacher
a150bdf140 r4288: don't use struct dcerpc_interface_table anymore in the
main rpc server code. let the backends specify a ndr_push/ndr_pull function
like we already do with the dispatch() function.

this allows an interface implmentation to work as real proxy
without needing to know the idl for an interface that means
just the plain decrypted payload can be forwarded

If someone want to write such a backend, patches are wellcome

metze
2007-10-10 13:07:32 -05:00
Andrew Tridgell
e399834ae1 r4170: don't check array size for conformant arrays (they are checked separately) 2007-10-10 13:07:22 -05:00
Andrew Tridgell
3040cd6515 r4139: 2nd attempt at fixing the null ptr in size_is() problem. 2007-10-10 13:06:30 -05:00
Andrew Tridgell
8cbd3f47a9 r4136: when we have a size or switch variable that is a pointer we need to check that the server
hasn't given us a null pointer, otherwise we can segv when we dereference it. For example:

  [size_is(*size)] *x;
  uint32 *size;

if a broken server gave us x != NULL and size == NULL then we would crash. I've added
a check_null_pointer() call in pidl to catch this.
2007-10-10 13:06:29 -05:00
Andrew Tridgell
83221a0da0 r4112: when a pointer is NULL on the wire ensure it is null in the structure 2007-10-10 13:06:27 -05:00
Andrew Tridgell
e839b19ec5 r4110: fixed pidl to allow arrays to have size_is() and length_is() elements
that depend on variables that come after the array in the structure or function.

This has been something that has been problematic for a while, but the
winreg QueryValue problem finally prompted me to fix it properly. We
should now go back and fix up all the ugly workarounds we have used to
avoid this problem in other calls.

Unfortunately the solution is fairly complex, and involves the use of
the internal ndr token lists (similar to the solution for relative
pointers). I wonder if anyone else will be able to follow the logic if
I get run over by a bus :-)
2007-10-10 13:06:27 -05:00