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

55 Commits

Author SHA1 Message Date
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
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
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
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
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
7264a2227d r3998: allow const arrays (see next commit to drsuapi.idl)
metze
2007-10-10 13:06:12 -05:00
Jelmer Vernooij
a00bda88e1 r3861: - Put ndr and rpc client code in seperate files
- Add some const
2007-10-10 13:05:58 -05:00
Jelmer Vernooij
7466947a23 r3689: Large number of COM updates:
- Work on server side and local COM support (should work, just no
	  example classes yet)
 - Use vtables so that local and remote calls can be used transparently
 - Generate 'proxies and stubs' rather then heavily modified code in client.pm and server.pm. proxies (client side code) are generated in proxy.pm, stubs (server side dispatchers) are generated in stubs.pm
 - Support registering classes and interfaces
 - DCOM interfaces no longer have to be in the same IDL file as their
    base interface, which will allow us to split up dcom.idl
2007-10-10 13:05:44 -05:00
Jelmer Vernooij
7484b9be74 r3667: Small COM fixes 2007-10-10 13:05:43 -05:00
Jelmer Vernooij
8693344772 r3611: DCOM client support works!!
The torture test DCOM-SIMPLE now successfully does an
IStream_Read and a IStream_Write call.

This test can now be run successfully against the "Simple DCOM" Visual
Studio example.

(You have to quote out line 337 in pidl. pidl complains if the variable
 that contains the array size follows the array. I still need to fix this
 properly)

Next goals:
 - Clean up code
 - Server side support
 - Support custom marshalling
 - Support DCOM interfaces in files other then dcom.idl
2007-10-10 13:05:39 -05:00
Jelmer Vernooij
93eb3cd99c r3601: Lots of smaller DCOM updates and fixes. Adds oxid tables, proper
use of contexts.
2007-10-10 13:05:38 -05:00
Jelmer Vernooij
7a8244761b r3586: Fix some of the issues with the module init functions.
Both subsystems and modules can now have init functions, which can be
specified in .mk files (INIT_FUNCTION = ...)

The build system will define :
 - SUBSYSTEM_init_static_modules that calls the init functions of all statically compiled modules. Failing to load will generate an error which is not fatal
 - BINARY_init_subsystems that calls the init functions (if defined) for the subsystems the binary depends on

This removes the hack with the "static bool Initialised = " and the
"lazy_init" functions
2007-10-10 13:05:36 -05:00
Jelmer Vernooij
c052f2e1ed r3513: Add (the infrastructure for) DCOM support. Contents:
- Support for sending over the object UUID in DCERPC calls
 - Simple torture test for the DCOM "Simple" object
 - Generate extra argument for "object" interfaces in pidl
 - Some stubs for common DCOM functions
2007-10-10 13:05:23 -05:00
Jelmer Vernooij
8e25117103 r3442: Add support for the "call_as" and "local" attributes. 2007-10-10 13:05:11 -05:00
Andrew Tridgell
b8f5fa8ac8 r3428: switched to using minimal includes for the auto-generated RPC code.
The thing that finally convinced me that minimal includes was worth
pursuing for rpc was a compiler (tcc) that failed to build Samba due
to reaching internal limits of the size of include files. Also the
fact that includes.h.gch was 16MB, which really seems excessive. This
patch brings it back to 12M, which is still too large, but
better. Note that this patch speeds up compile times for both the pch
and non-pch case.

This change also includes the addition iof a "depends()" option in our
IDL files, allowing you to specify that one IDL file depends on
another. This capability was needed for the auto-includes generation.
2007-10-10 13:05:09 -05:00
Andrew Tridgell
009488dfe5 r3423: auto-generate prototypes for all external functions in pidl 2007-10-10 13:05:08 -05:00
Andrew Tridgell
4aab2cb210 r3282: some C pre-processors don't like expressions like
uuid(1ff70682-0a51-30e8-076d-740be8cee98b) so we now accept
uuid("1ff70682-0a51-30e8-076d-740be8cee98b") in pidl, and
automagically add quotes only if needed
2007-10-10 13:04:49 -05:00
Andrew Tridgell
00ff1ca1d2 r3281: some compilers can't handle empty structures, so for empty IDL
structures generate a single _empty_ element in the header
2007-10-10 13:04:49 -05:00
Stefan Metzmacher
e9e5fb2cb0 r1909: nicer format
metze
2007-10-10 12:58:10 -05:00
Jelmer Vernooij
85fb26a05d r1786: Add support for the 'helpstring' attribute on interfaces 2007-10-10 12:57:56 -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
Jelmer Vernooij
b380324c93 r1700: make version default to 0.0 (same as midl) 2007-10-10 12:57:49 -05:00
Stefan Metzmacher
917e45dafd This patch adds a better dcerpc server infastructure.
1.) We now register endpoint servers add startup via register_backend()
    and later use the smb.conf 'dcerpc endpoint servers' parameter to setup the dcesrv_context

2.) each endpoint server can register at context creation time as much interfaces as it wants
    (multiple interfaces on one endpoint are supported!)
    (NOTE:  there's a difference between 'endpoint server' and 'endpoint'!
	    for details look at rpc_server/dcesrv_server.h)

3.) one endpoint can have a security descriptor registered to it self
    this will be checked in the future when a client wants to connect
    to an smb pipe endpoint.

4.) we now have a 'remote' endpoint server, which works like the ntvfs_cifs module
    it takes this options in the [globals] section:

    dcerpc remote:interfaces = srvsvc, winreg, w32time, epmapper
    dcerpc remote:binding = ...
    dcerpc remote:user = ...
    dcerpc remote:password = ...

5.) we currently have tree endpoint servers: epmapper, rpcecho and remote

    the default for the 'dcerpc endpiont servers = epmapper, rpcecho'

    for testing you can also do
    dcerpc endpoint servers = rpcecho, remote, epmapper
    dcerpc remote:interfaces = srvsvc, samr, netlogon

6,) please notice the the epmapper now only returns NO_ENTRIES
    (but I think we'll find a solution for this too:-)

7.) also there're some other stuff left, but step by step :-)

This patch also includes updates for the
register_subsystem() , ntvfs_init(), and some other funtions
to check for duplicate subsystem registration


metze

(hmmm, my first large commit...I hope it works as supposed :-)
-
Andrew Tridgell
bb1af644a5 a fairly large commit!
This adds support for bigendian rpc in the client. I have installed
SUN pcnetlink locally and am using it to test the samba4 rpc
code. This allows us to easily find places where we have stuffed up
the types (such as 2 uint16 versus a uint32), as testing both
big-endian and little-endian easily shows which is correct. I have now
used this to fix several bugs like that in the samba4 IDL.

In order to make this work I also had to redefine a GUID as a true
structure, not a blob. From the pcnetlink wire it is clear that it is
indeed defined as a structure (the byte order changes). This required
changing lots of Samba code to use a GUID as a structure.

I also had to fix the if_version code in dcerpc syntax IDs, as it
turns out they are a single uint32 not two uint16s.

The big-endian support is a bit ugly at the moment, and breaks the
layering in some places. More work is needed, especially on the server
side.
-
Andrew Tridgell
d18a08a870 the out substructure is not empty if there is a return from the
function
-
Andrew Tridgell
b6fdc98402 some compilers can't handle structures with no elements. Generate
dummy elements if need be.
-
Andrew Tridgell
a4aa9168c0 make pidl no longer dependent on Data::Dumper, which isn't installed
on some systems
-
Andrew Tridgell
bd3dcfe582 added auto-generation of the server side boilerplate code for each
pipe.

The server side code gets generated as librpc/gen_ndr/ndr_NAME_s.c and
gets included in the pipe module
-
Andrew Tridgell
983c0e9683 added netr_DatabaseSync(). It doesn't work as I haven't done schannel
yet, but at least the request is understood by w2k3

Also modified pidl to allow multiple branches in a union to have the
same element. This is used in netlogon.
-
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
3492f37b0b added some paranoid checking for enums -
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
60be15d306 added support for enumerated types in IDL files. This makes unions
easier to work with.
-
Andrew Tridgell
344a6e1682 added support for 'const' in IDL files. This makes it easy to define
symbolic names for bitfields etc.
-
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
a5eeb3be05 added support for 'ascstr', a ascii string in MSRPC ! -
Andrew Tridgell
a291dd835f use a precompiled grammer in pidl. This speeds up pidl by about a
factor of 2 on my system.
-
Andrew Tridgell
3b7a4b70a3 use strict perl package everywhere for error checking -
Andrew Tridgell
a44d952fcb * added a 'lstring' type for spoolss
* added some notes on type equivalents in NOTES.txt
-
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
cdba426e62 auto-generate the pipe UUID version and name -
Andrew Tridgell
22b5418a53 started documenting the extension to IDL that pidl implements -
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
-
Andrew Tridgell
22e1502350 I think we now handle conformant arrays in structures correctly - the
test cases pass
-
Andrew Tridgell
54613574bc - added support for the pull side of unions
- don't generate parse functions for pull/push functions that are not
  used
-
Andrew Tridgell
4df59bcff5 much cleaner handling of the different types of variables -