summaryrefslogtreecommitdiff
path: root/source4/torture/rpc/epmapper.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r14735: Use dcerpc_syntax_id rather then seperate GUID + if_version everywhereJelmer Vernooij1-5/+4
(This used to be commit a316b33057f3ec8532677980e093cd327d33f257)
2007-10-10r14720: Add torture_context argument to all torture testsJelmer Vernooij1-1/+1
(This used to be commit 3c7a5ce29108dd82210dc3e1f00414f545949e1d)
2007-10-10r14470: Remove some unnecessary headers.Jelmer Vernooij1-1/+0
(This used to be commit f7312dab3b9aba2b2b82e8a6e0c483a32a03a63a)
2007-10-10r14402: Generate seperate headers for RPC client functions.Jelmer Vernooij1-0/+1
(This used to be commit 7054ebf0249930843a2baf4d023ae8f62cedb109)
2007-10-10r14379: Build torture/rpc/ as a seperate smbtorture module. Move helperJelmer Vernooij1-0/+1
functions for rpc out of torture/torture.c (This used to be commit 1d2d970f3b8aef3f36c2befb94b5dd72c0086639)
2007-10-10r12693: Move core data structures out of smb.h into core.hJelmer Vernooij1-0/+1
torture prototypes in seperate header (This used to be commit 73610639b23ca3743077193fa0b1de7c7f65944d)
2007-10-10r12622: Move table.c prototypes to seperate header to prevent circular ↵Jelmer Vernooij1-0/+1
dependencies with proto.h (This used to be commit 9e0ba380374db028358158b9e4457dd930b5ab13)
2007-10-10r12608: Remove some unused #include lines.Jelmer Vernooij1-1/+0
(This used to be commit 70e7449318aa0e9d2639c76730a7d1683b2f4981)
2007-10-10r12514: Move DCE/RPC interface table to a seperate fileJelmer Vernooij1-1/+1
Be a bit more strict when checking for duplicate interfaces (This used to be commit b1286a6d27e2b5aa26f288f6aff70601b0d8ae74)
2007-10-10r12512: Use GUID structs in API functions everywhere rather then converting ↵Jelmer Vernooij1-3/+1
back and forth between GUID structs and strings in several places. (This used to be commit 3564e2f967ef72d6301b4f7e9a311cebcded4d75)
2007-10-10r12510: Change the DCE/RPC interfaces to take a pointer to aJelmer Vernooij1-5/+1
dcerpc_interface_table struct rather then a tuple of interface name, UUID and version. This removes the requirement for having a global list of DCE/RPC interfaces, except for these parts of the code that use that list explicitly (ndrdump and the scanner torture test). This should also allow us to remove the hack that put the authservice parameter in the dcerpc_binding struct as it can now be read directly from dcerpc_interface_table. I will now modify some of these functions to take a dcerpc_syntax_id structure rather then a full dcerpc_interface_table. (This used to be commit 8aae0f168e54c01d0866ad6e0da141dbd828574f)
2007-10-10r5941: Commit this patch much earlier than I would normally prefer, but ↵Andrew Bartlett1-3/+3
metze needs a working tree... The main volume of this patch was what I started working on today: - Cleans up memory handling around DCE/RPC pipes, to have a parent talloc context. - Uses sepereate inner loops for some of the DCE/RPC tests The other and more important part of this patch fixes issues surrounding the new credentials framwork: This makes the struct cli_credentials always a talloc() structure, rather than on the stack. Parts of the cli_credentials code already assumed this. There were other issues, particularly in the DCERPC over SMB handling, as well as little things that had to be tidied up before test_w2k3.sh would start to pass. Andrew Bartlett (This used to be commit 0453f9d05d2e336fba1f85dbf2718d01fa2bf778)
2007-10-10r5902: A rather large change...Andrew Bartlett1-2/+2
I wanted to add a simple 'workstation' argument to the DCERPC authenticated binding calls, but this patch kind of grew from there. With SCHANNEL, the 'workstation' name (the netbios name of the client) matters, as this is what ties the session between the NETLOGON ops and the SCHANNEL bind. This changes a lot of files, and these will again be changed when jelmer does the credentials work. I also correct some schannel IDL to distinguish between workstation names and account names. The distinction matters for domain trust accounts. Issues in handling this (issues with lifetime of talloc pointers) caused me to change the 'creds_CredentialsState' and 'struct dcerpc_binding' pointers to always be talloc()ed pointers. In the schannel DB, we now store both the domain and computername, and query on both. This should ensure we fault correctly when the domain is specified incorrectly in the SCHANNEL bind. In the RPC-SCHANNEL test, I finally fixed a bug that vl pointed out, where the comment claimed we re-used a connection, but in fact we made a new connection. This was achived by breaking apart some of the dcerpc_secondary_connection() logic. The addition of workstation handling was also propogated to NTLMSSP and GENSEC, for completeness. The RPC-SAMSYNC test has been cleaned up a little, using a loop over usernames/passwords rather than manually expanded tests. This will be expanded further (the code in #if 0 in this patch) to use a newly created user account for testing. In making this test pass test_rpc.sh, I found a bug in the RPC-ECHO server, caused by the removal of [ref] and the assoicated pointer from the IDL. This has been re-added, until the underlying pidl issues are solved. (This used to be commit 824289dcc20908ddec957a4a892a103eec2da9b9)
2007-10-10r5209: Fix the endpoint mapper to work with IPX endpoints (whichJelmer Vernooij1-91/+13
accidently have the same protocol id as UUID's) Before this, Samba would give NDR errors when contacting a remote server that has IPX support enabled. This one was on my long due bugs list. (This used to be commit 7b847de64f35b8e897b64ad047d8aea3813214f8)
2007-10-10r5155: define ipv4address as a based IDL type, mapped to a "const char *" inAndrew Tridgell1-7/+2
the header, and defined on the wire as a 4 byte network byte order IP. This means the calling code doesn't have to worry about network byte order conversions. (This used to be commit 72048e37179dd5b9ada0c5280d2f0d8c23d1a17d)
2007-10-10r5148: use ipv4_addr also in epmapper idlStefan Metzmacher1-2/+2
metze (This used to be commit cbc1f172822363e1fc4495d27248464403748cae)
2007-10-10r5037: got rid of all of the TALLOC_DEPRECATED stuff. My apologies for theAndrew Tridgell1-4/+4
large commit. I thought this was worthwhile to get done for consistency. (This used to be commit ec32b22ed5ec224f6324f5e069d15e92e38e15c0)
2007-10-10r4631: don't consider an epmapper insert as a failure for the momentAndrew Tridgell1-1/+2
(This used to be commit ba6caa99a454cb3393c8898f1e5be4a432b820c4)
2007-10-10r4621: Add torture tests for epm_Insert and epm_DeleteJelmer Vernooij1-0/+71
(This used to be commit b1ff60667038aa1e2d7c6ad2015ba33ac5a90dc6)
2007-10-10r4559: prevent the RPC-EPMAPPER test from looping forever against w2k3Andrew Tridgell1-4/+11
(This used to be commit fa3cecddd8065885dd461000de683eb0143eb481)
2007-10-10r4457: Fix IDL + add torture test for InqObjectJelmer Vernooij1-1/+22
(This used to be commit dbcaff7c71c9b7ee984a2ed458b6c3ce27772740)
2007-10-10r3626: More minor DCOM fixesJelmer Vernooij1-0/+13
(This used to be commit 709f279b192c8f9eeea04749169c00f2d57b20d3)
2007-10-10r3457: s_addr is a macro on solaris, so we can't use it in structure names. ↵Andrew Tridgell1-1/+1
arrgh. (This used to be commit 7842b23d01c53009259a2461600bd01159cecebf)
2007-10-10r3443: the next stage in the include files re-organisation.Andrew Tridgell1-2/+3
I have created the include/system/ directory, which will contain the wrappers for the system includes for logical subsystems. So far I have created include/system/kerberos.h and include/system/network.h, which contain all the system includes for kerberos code and networking code. These are the included in subsystems that need kerberos or networking respectively. Note that this method avoids the mess of #ifdef HAVE_XXX_H in every C file, instead each C module includes the include/system/XXX.h file for the logical system support it needs, and the details are kept isolated in include/system/ This patch also creates a "struct ipv4_addr" which replaces "struct in_addr" in our code. That avoids every C file needing to import all the system networking headers. (This used to be commit 2e25c71853f8996f73755277e448e7d670810349)
2007-10-10r3428: switched to using minimal includes for the auto-generated RPC code.Andrew Tridgell1-0/+1
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. (This used to be commit b8f5fa8ac8e8725f3d321004f0aedf4246fc6b49)
2007-10-10r3414: RemoteActivation torture testJelmer Vernooij1-24/+47
(This used to be commit bcb89806fe45db50988f241db51989d90aa2289c)
2007-10-10r3413: RemoteActivation updates and fixesJelmer Vernooij1-47/+24
Add torture test for RemoteActivation The request is now send correctly and we get back a valid response from Windows but r->in.Interfaces is set to 0 somewhere while parsing the response... (This used to be commit cabec03422f0c7140b56b2d5c4ec8ca663b406fc)
2007-10-10r3324: made the smbtorture code completely warning freeAndrew Tridgell1-1/+1
(This used to be commit 7067bb9b52223cafa28470f264f0b60646a07a01)
2007-10-10r3278: - rewrote the client side rpc connection code to use lib/socket/Andrew Tridgell1-1/+3
rather than doing everything itself. This greatly simplifies the code, although I really don't like the socket_recv() interface (it always allocates memory for you, which means an extra memcpy in this code) - fixed several bugs in the socket_ipv4.c code, in particular client side code used a non-blocking connect but didn't handle EINPROGRESS, so it had no chance of working. Also fixed the error codes, using map_nt_error_from_unix() - cleaned up and expanded map_nt_error_from_unix() - changed interpret_addr2() to not take a mem_ctx. It makes absolutely no sense to allocate a fixed size 4 byte structure like this. Dozens of places in the code were also using interpret_addr2() incorrectly (precisely because the allocation made no sense) (This used to be commit 7f2c771b0e0e98c5c9e5cf662592d64d34ff1205)
2007-10-10r3162: Add client-side support for the ncalrpc: and ncacn_unix_stream: ↵Jelmer Vernooij1-5/+2
transports. ncalrpc uses the new config option "ncalrpc dir" for creating unix sockets. (This used to be commit b15cfbe2512961a199ecb069730d9a19787579f5)
2007-10-10r3136: - Allow specifying socket type when adding smbd serviceJelmer Vernooij1-1/+1
- Make sure a epm_tower struct is completely initialized - Some more minor fixes (This used to be commit d560dcbdb85cb2c6915bdb9e2f82f1872b0f5a52)
2007-10-10r3112: Fix two more instances of epm_towers (sorry, metze!)Jelmer Vernooij1-1/+1
(This used to be commit 7baf493966aa3fb61623d6030b5ccc26a5fcb186)
2007-10-10r3111: Add a few more protocol identifiers, rhs for ncalrpcJelmer Vernooij1-28/+28
(This used to be commit 53567a83cbca9df60bef76a15df24d2cd89a16b0)
2007-10-10r2969: inet_ntoa() takes an address in network byte order, so now that weAndrew Tridgell1-1/+1
parse the RHS as IDL, we need to use htonl() to convert back to network byte order before we can display the IP (This used to be commit 45508b85dabf8aa66bff9aeebf99c1faf3d475ec)
2007-10-10r2938: Use IDL to dissect the RHS of floors in protocol towersJelmer Vernooij1-28/+18
(This used to be commit 273d0049b5339e3288b264e5a4393bfab1d4e239)
2007-10-10r2921: Add a few more protocols and fix the numbers associated with some ofJelmer Vernooij1-24/+36
the current ones. It took me three hours to realise that the DCOM standard contains false protocol numbers (apparently someone converted the protocol numbers to hex twice, i.e. 13 -> 0c and 14 to 0d). There are no longer duplicates in the list with protocol numbers now. (This used to be commit f355cd426462a72575ef3c3b769f676334976986)
2007-10-10r2100: rework the dcerpc client side library so that it is async. We nowAndrew Tridgell1-6/+6
generate a separate *_send() async function for every RPC call, and there is a single dcerpc_ndr_request_recv() call that processes the receive side of any rpc call. The caller can use dcerpc_event_context() to get a pointer to the event context for the pipe so that events can be waited for asynchronously. The only part that remains synchronous is the initial bind calls. These could also be made async if necessary, although I suspect most applications won't need them to be. (This used to be commit f5d004d8eb8c76c03342cace1976b27266cfa1f0)
2007-10-10r1818: _really_ fixed epmapper this time, it was using more than one old rpc ↵Andrew Tridgell1-5/+5
interface method. (This used to be commit ec41c73ae136bffea4285ade8be322b3c4cf3629)
2007-10-10r1703: - Lots of RPC updates, adding new pipes and protocols.Jelmer Vernooij1-13/+34
- More updates/fixes to the ethereal parser generator (This used to be commit 547f860285b117e291bf3dbaca0707dc268b214e)
2004-02-03- add 'print' to the DCERPC binding stringsStefan Metzmacher1-2/+0
e.g. ncacn_np:myserver:[samr,sign,print] will now enable the packet debugging and the debugging is not bound anymore to the debuglevel >= 2 in the torture tests - also the dcesrv_remote module now supports debugging of the packets use the 'dcerpc_remote:binding' smb.conf parameter. metze (This used to be commit 40abf3c584efed7f977ddd688ea064540e5a5b13)
2003-12-16a fairly large commit!Andrew Tridgell1-1/+1
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. (This used to be commit bb1af644a5a7b188290ce36232f255da0e5d66d2)
2003-12-13added a basic dcerpc endpoint mapper to Samba4. Currently onlyAndrew Tridgell1-6/+6
implements the epm_Lookup() call, I'll add the other important calls soon. I was rather pleased to find that epm_Lookup() worked first time, which is particularly surprising given its complexity. This required quite a bit of new infrastructure: * a generic way of handling dcerpc policy handles in the rpc server * added type checked varients of talloc. These are much less error prone. I'd like to move to using these for nearly all uses of talloc. * added more dcerpc fault handling code, and translation from NTSTATUS to a dcerpc fault code * added data_blob_talloc_zero() for allocating an initially zero blob * added a endpoint enumeration hook in the dcerpc endpoint server operations (This used to be commit 3f85f9b782dc17417baf1ca557fcae22f5b6a83a)
2003-11-28 * added a bunch of placeholder IDL filesAndrew Tridgell1-0/+5
* 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) (This used to be commit c8b8480244b4ab6204403dc65e92e4317b410a84)
2003-11-27more epmapper and mgmt magicAndrew Tridgell1-17/+60
protocol 0x1f is interesting - its ncacn_http ! (This used to be commit e3d40e3da6e15407162c1d0a29d2cbe86842228e)
2003-11-26signed DCERPC over TCP now works !Andrew Tridgell1-0/+8
* moved ntlmssp code into libcli/auth/, and updated to latest ntlmssp code from samba3 (thanks Andrew! the new interface is great) * added signing/ntlmssp support in the dcerpc code * added a dcerpc_auth.c module for the various dcerpc auth mechanisms (This used to be commit c18c9b5585a3e5f7868562820c14f7cb529cdbcd)
2003-11-24 * fixed byte order in epmapper parsingAndrew Tridgell1-7/+7
* allow rpc transport to be specified on command line in smbtorture (This used to be commit 8a82050fd6f45bcdb31c2c365eaed5fc12599e4f)
2003-11-24initial implementation of dcerpc over tcp. RPC-EPMAPPER works, now toAndrew Tridgell1-4/+4
add epm_Map calls and support the rest of the pipes (This used to be commit 39add481582609ddb9d0b3bae45fde3226ece481)
2003-11-24added tests for epm_Map endpointer map callsAndrew Tridgell1-23/+55
(This used to be commit 570ad78525ffcc116842270b62ba41c86c2a018d)
2003-11-24give far more detail in the EPMAPPER resultsAndrew Tridgell1-9/+82
(This used to be commit 420301969820ffaa0a87b091c7a79372c99cb658)
2003-11-22a fairly major upgrade to the dcerpc systemAndrew Tridgell1-0/+2
* 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 (This used to be commit 8ecf720206a2eef3f8ea7cbdb1f460664a5dba9a)