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

79 Commits

Author SHA1 Message Date
Jelmer Vernooij
85fb26a05d r1786: Add support for the 'helpstring' attribute on interfaces 2007-10-10 12:57:56 -05:00
Andrew Tridgell
ecb7378bbc r1757: much simpler (and smaller, faster etc) way of doing relative pointers
in pidl. This mechanism should be much easier to extend to the
"retrospective subcontexts" that jelmer needs.

also produced more standards complient full-pointer offsets. This
keeps ethereal happy with decoding our epmapper frames.
2007-10-10 12:57:54 -05:00
Jelmer Vernooij
45c3d0036b r1736: - Pidl updates:
- Support for "object oriented" interfaces in pidl
 - Support for inherited interfaces in pidl
 - Simplification of the support for properties on an interface
- Start on dcom rpc torture tests
2007-10-10 12:57:51 -05:00
Andrew Tridgell
0d063725e1 r1671: make [relative] pointers in idl much more generic, treating them just
like normal pointers in most cases. This means we can now support
relative pointers to unions, builtin types etc, whereas we could only
previously support relative pointers to structures.

metze needs this for the PAC decoding.
2007-10-10 12:57:48 -05:00
Tim Potter
d9b4e45f46 r1611: Put a brace on a new line. 2007-10-10 12:57:44 -05:00
Andrew Tridgell
0a67b9c324 r1148: fixed a minor formatting error in generated code 2007-10-10 12:56:41 -05:00
Andrew Tridgell
ad3324a79c r1133: - add ndr_pull_ptr() as a separate call instead of ndr_pull_uint32()
(useful for debugging IDL)

- fixed a couple of places that auto-generate incorrect printf style arguments
  for ndr_pull_error()
2007-10-10 12:56:39 -05:00
Andrew Tridgell
dffe916516 r1014: change the handling of r->out to auto-zero the structure, and auto-copy
in,out,ref vars
2007-10-10 12:56:26 -05:00
Andrew Tridgell
20cc981e33 r894: use _t in generated pidl code 2007-10-10 12:56:18 -05:00
Andrew Tridgell
866ef2edab added a little bit of const magic to get rid of the data in librpc/gen_ndr/*.o -
Andrew Tridgell
a4aa9168c0 make pidl no longer dependent on Data::Dumper, which isn't installed
on some systems
-
Andrew Tridgell
fa45529af7 fixed the handling of zero-length top level arrays in pidl -
Andrew Tridgell
5fed4681ed fix _ptr_ declaration -
Andrew Tridgell
28fa62d63d handle the auto-allocation of [ref] output arrays in pidl. This
can simplify rpc servers a lot.
-
Andrew Tridgell
46e0a35819 * the RPC-ECHO pipe now works in smbd, as long as the data sizes
don't cause fragmented pdus (I'll add fragments shortly)

 * change data_blob_talloc() to not zero memory when the 2nd argument
   is NULL. The zeroing just masks bugs, and can't even allow a DOS
   attack

 * modified pidl to ensure that [ref] arguments to the out side of
   functions are allocated when parsing the in side. This allows rpc
   backends to assume that [ref] variables are all setup. Doesn't work
   correctly for [ref] arrays yet

 * changed DLIST_ADD_END() to take the type instead of a tmp
   variable. This means you don't need to declare a silly tmp variable in
   the caller
-
Andrew Tridgell
c598590a11 more portable array of endpoints code from pidl -
Andrew Tridgell
c4c09e9413 netr_DatabaseSync() now works fully for databases 0, 1 and 2 -
Andrew Tridgell
3dd978b12b * netr_ServerPasswordSet() now works - the test suite changes the
machine account password.

  * neater handling on value() options in IDL. The auto-print code
    will now display the right value so you don't need to initialise
    it in your C code
-
Andrew Tridgell
4fa3ad3ecb added netr_LogonSamLogon() and test code -
Andrew Tridgell
bb42107dcc added netr_ServerReqChallenge and cleaned up byte array printing -
Andrew Tridgell
c8b8480244 * added a bunch of placeholder IDL files
* allow for an interface to list its endpoints in the IDL file, so we
   can automatically make the server listen on the right pipes, and
   can scan pipes more easily (I don't take advantage of this yet,
   just putting the infrastructure in place)
-
Andrew Tridgell
a2bdf0be01 * support multiple interfaces in one IDL file in pidl
* make far more generated functions static

 * get rid of gen_rpc, and include the client calls in ndr_*.c

 * added placeholder IDL for a number of intefaces (dcom, wzcsvc, browser etc)
-
Andrew Tridgell
f5821b2468 added an rpc scanner. This prints messages like this:
uuid 82273fdc-e32a-18c3-3f78-827929dc23ea  version 0x0000:0x0000  'eventlog'
        24 calls available
        WARNING: local IDL defines 4 calls

when all the WARNINGs are gone then we know we have all the calls :)
-
Andrew Tridgell
8bce61b8af * prepared the dcerpc subsystem for adding the RPC over TCP transport
* fixed a uninitialised variable bug in pidl (found by valgrind)
-
Andrew Tridgell
4a6034f2e3 make sure we don't try to update a constant -
Andrew Tridgell
00f9b0e120 added tests for the remaining calls on the rpc management interface -
Andrew Tridgell
229a325c3c added a tool called 'ndrdump' that allows you to dump NDR data
according to the current IDL taking the data from a file. In
combination with a little hack to ethereal to extract data this is a
quite powerful IDL development tool.
-
Andrew Tridgell
d8d17be290 fixed the handling of value() attributes on scalars in IDL that
reference other elements of the same structure
-
Andrew Tridgell
92bcad0258 ooh, this is fun!
I have recoded the core dcerpc packet structures (all the PDUs etc) in
terms of IDL, which means we now use pidl to generate all the code for
handling the most basic dcerpc packets. This is not normally possible
as it isn't completely valid NDR, but pidl has a number of extensions
that make it quite easy.

This also means we get the server side dcerpc
marshalling/unmarshalling code for free.
-
Andrew Tridgell
4aea2d79dd * fixed handling of relative subcontext unions
* fixed GetPrinter in spoolss after OpenPrinter
-
Andrew Tridgell
11c0fe548e * enable RPC/NDR validation in all smbtorture code
* allow us to distinguish between null arrays and zero length arrays,
   by making the allocation size a minimum of 1 on array pull
-
Andrew Tridgell
8ecf720206 a fairly major upgrade to the dcerpc system
* added a NDR validator. The way it works is that when the
   DCERPC_DEBUG_VALIDATE_* flags are set the dcerpc system will
   perform NDR buffer validation. On sending a request the packet is
   first marshalled, then unmarahslled, then marshalled again, and it is
   confirmed that the two marshalling results are idential. This
   ensures that our pull and push routines are absolutely in sync, so
   that we can be very confident that if a routine works in the client
   then the corresponding routine must work on the server side. A
   similar validation is performed on all replies.

 * a result of this change is that pidl is fussier about the [ref]
   tag. You can only use it on pointers (which is the only place it
   makes sense)

 * fixed a basic alignment bug in the push side of the NDR code

 * added server side pull/push support. Our dcerpc system is now fully
   ready to be used on the server side.

 * fixed the relative offset pointer list. It must be traversed in
   reverse order on push

 * added automatic value setting for the size parameter in outgoing
   SdBuf structures.

 * expanded the ndr debugging code to always give a message on any
   failure

 * fixed the subcontext push code

 * fixed some memory leaks in smbtorture RPC tests
-
Andrew Tridgell
bc2fbc79cc fixed a bug with pushing non-pointer unions -
Andrew Tridgell
d2665f36a7 * changed the way strings are handled in pidl to a much more general
interface. We now support an arbitrary set of flags to each parser,
  and these can be used to control the string types. I have provided
  some common IDL string types in librpc/idl/idl_types.h which needs to
  be included in every IDL file.

* added IDL for the endpoint mapper. Added a test suite that enumerates
  all endpoints on the server.
-
Andrew Tridgell
9fee737931 make sure we don't try to use c++ style variable declaration -
Andrew Tridgell
bb30f42cd4 fixed pushing structures containing pointers inside unions -
Andrew Tridgell
964c323721 a bit neater way of emitting code -
Andrew Tridgell
a706ff7893 * cope with pidl not being in $HOME/pidl
* cope with empty structures in unions
-
Andrew Tridgell
786566e53c avoid compiler warnings for unused variables with [relative] pointers -
Andrew Tridgell
3b7a4b70a3 use strict perl package everywhere for error checking -
Andrew Tridgell
6ecdb25e13 * added support for empty case elements (including default cases)
* changed to midl syntax using [case(x)] instead of case(x)
-
Andrew Tridgell
c0d96f87ea switched to a new way of handling unions, so that we can handle
alignment correctly for unions that have non-uint16 discriminants

added recursive structure alignment. This gets quite hairy, but I
think I've got it mostly right.
-
Andrew Tridgell
d3838c3668 slightly more accurate structure alignment code - I need to do proper
recursive alignment soon
-
Andrew Tridgell
7f3f274cdc support the 'default' case in IDL unions -
Andrew Tridgell
db74a03d15 auto-generate top-level debug print functions when a flag is set on
the dcerpc pipe. This saves lots of code in each test suite.
-
Andrew Tridgell
6afc3a465e auto-generate functions for printing top-level function
parameters. You can choose to print just the [in] parameters, just the
[out] parameters or both
-
Andrew Tridgell
08df20c8be * support inline arrays
* add enough to allow security descriptors to be IDL described

* added "noprint" property to allow fancy printing for specific
  functions
-
Andrew Tridgell
eb887f883a better [relative] handling, allowing for nested relative structures
and arrays of relative structures
-
Andrew Tridgell
4a34a4f29c * the beginnings of non-constant fixed arrays
* added relative pointers support
-
Andrew Tridgell
fb2f8c6bff added support for "relstr", structure and union properties and public
functions
-