Commit Graph

910 Commits

Author SHA1 Message Date
Rob Shearman ba280fb1b0 rpcrt4: Fix a typo in rpcrt4_conn_tcp_read. 2007-12-14 12:27:09 +01:00
Rob Shearman 25bf0a409a rpcrt4: Update TODO list.
Out-of-memory check is performed by NdrAllocate and so isn't required to 
be done in the unmarshalling functions.
2007-12-14 12:24:34 +01:00
Rob Shearman 4a028589eb rpcrt4: Document NdrAllocate. 2007-12-14 12:24:24 +01:00
Rob Shearman c7261b732b rpcrt4: Partially revert commit 18faf3184b2ea263d77c2a7ad92eef27bc4ba08f.
Tests show that NdrPointerFree (and hence NdrFree) don't check whether 
the memory was allocated with NdrAllocate before freeing it. This makes 
sense as servers don't need to use NdrAllocate to allocate memory being 
returned and so this commit caused that memory to be leaked.

NdrAllocate hasn't been changed as the tests show it is correct and it 
appears that the memory list is used to implement the RpcSs memory model.
2007-12-14 12:24:21 +01:00
Rob Shearman ce220e2b5f rpcrt4: Free the base pointer in PointerFree when freeing a pointer with RPC_FC_P_DEREF. 2007-12-14 12:24:03 +01:00
Rob Shearman d5ff3467bc rpcrt4: Fix the check in NdrPointerFree.
Add comments to justify why this is the only check that is needed.
2007-12-14 12:23:55 +01:00
Rob Shearman 9d8ebc1a24 rpcrt4: NdrStubGetBuffer shouldn't set BufferStart and BufferEnd.
These are supposed to point to the original buffer when the types were 
unmarshalled.
2007-12-14 12:23:46 +01:00
Rob Shearman ded4b86625 Revert "rpcrt4: Try to free every non-stack pointer in PointerFree now that NdrFree does the sanity checking for us.".
This reverts commit 6db648302ce43f625a073426a35a6f40b7869d8b.

Tests show the assumptions in a commit that this commit depends on are 
not valid.
2007-12-14 12:23:38 +01:00
Rob Shearman 9642714d06 rpcrt4: Add tests for freeing non-NdrAllocate allocated memory blocks. 2007-12-13 14:30:40 +01:00
Rob Shearman e12b487e26 rpcrt4: Try to free every non-stack pointer in PointerFree now that NdrFree does the sanity checking for us. 2007-12-12 16:02:53 +01:00
Rob Shearman 9c8c74f388 rpcrt4: Store allocated memory in a singly-linked list to keep track of what we should and shouldn't free in NdrFree. 2007-12-12 16:02:43 +01:00
Rob Shearman 33c4c25dad rpcrt4: Make the NdrAllocate tests pass on XP SP2 and greater. 2007-12-12 16:01:33 +01:00
Rob Shearman d458a599eb widl: Add support for non-basetype return types. 2007-12-11 18:07:05 +01:00
Rob Shearman 766d8a17af rpcrt4: Pass the USER_MARSHAL_CB structure into user marshal routines. 2007-12-10 12:04:28 +01:00
Rob Shearman 80b8743aa2 rpcrt4: NdrRangeUnmarshall is implemented so add it to the spec file. 2007-12-10 12:04:19 +01:00
Rob Shearman a07afe7e06 rpcrt4: Implement NdrConformantArrayMemorySize. 2007-12-10 12:04:15 +01:00
Rob Shearman 41937c5756 rpcrt4: Add a missing break in DllMain. 2007-12-08 19:58:24 +01:00
Rob Shearman 417b9d80f2 rpcrt4: Save the buffer in EmbeddedPointerMemorySize, like EmbeddedPointerUnmarshall does. 2007-12-08 19:58:11 +01:00
Rob Shearman d7a0de303e rpcrt4: Fix the return value from NdrSimpleStructMemorySize. 2007-12-08 19:58:07 +01:00
Rob Shearman 3a13de3115 rpcrt4: Add a trace to NdrBaseTypeMemorySize. 2007-12-08 19:58:03 +01:00
Rob Shearman 7ae1d44816 rpcrt4: Implement PointerMemorySize. 2007-12-08 19:57:55 +01:00
Rob Shearman 8348f0413d rpcrt4: Fix NdrConformantStructUnmarshall to use buffer memory if applicable and to reuse memory for embedded pointers. 2007-12-08 19:57:46 +01:00
Rob Shearman a5f9ed81e3 rpcrt4: Fix NdrFixedArrayUnmarshall to use buffer memory if applicable and to reuse memory for embedded pointers. 2007-12-08 19:57:39 +01:00
Rob Shearman abbceb137a rpcrt4: Fix NdrConformantArrayUnmarshall to use buffer memory if applicable and to reuse memory for embedded pointers. 2007-12-08 19:57:32 +01:00
Alexandre Julliard c0b12351e0 Avoid size_t types in traces. 2007-12-07 18:49:18 +01:00
Rob Shearman 7092590c90 rpcrt4: Use an alertable wait in rpcrt4_protseq_np_wait_for_new_connection to fix a small memory leak flagged by Valgrind.
This is called only by the RPCRT4_server_thread so we don't have to 
worry about application user APCs being run at improper times.
2007-12-07 17:06:33 +01:00
Rob Shearman ba6aec70ca rpcrt4: Implement NdrConformantStructFree. 2007-12-07 17:06:05 +01:00
Rob Shearman 2ebee18198 rpcrt4: Improve PointerFree to not free buffer memory. 2007-12-07 16:34:17 +01:00
Rob Shearman 1b79da8be0 rpcrt4: Fix a memory leak caused by NdrFullPointerXlatFree not freeing the entries in the full pointer translation table. 2007-12-06 12:08:10 +01:00
Rob Shearman 867cc3c05f rpcrt4: Fix a memory leak when freeing an association by deleting the critical section. 2007-12-06 12:08:05 +01:00
Rob Shearman 5fb5fccac0 rpcrt4: Fix a memory leak in RpcAssoc_BindConnection. 2007-12-06 12:08:00 +01:00
Rob Shearman 13e47d762a rpcrt4: Set the memory pointer in NdrBaseTypeUnmarshall to the buffer if we're unmarshalling on a server without memory being passed in. 2007-12-05 13:49:08 +01:00
Rob Shearman 17132f7e1f rpcrt4: Set fMustAlloc to TRUE when unmarshalling an object pointer. 2007-12-05 13:48:59 +01:00
Rob Shearman c866b06806 rpcrt4: Add tests for a pointer to a conformant strings. 2007-12-04 18:18:03 +01:00
Rob Shearman 2a9fae7565 rpcrt4: Set the destination pointer in PointerUnmarshall before calling the referenced type's unmarshalling routine.
When a pointer that is dereferenced is encountered then this can result 
in a stale pointer (i.e. the one that is marshalled into the buffer for 
the embedded pointer unmarshalling case) being used instead of the one 
that was intended.
2007-12-04 18:18:01 +01:00
Rob Shearman a016d7b335 rpcrt4: Handle all non-continuable exceptions in CStdStubBuffer_Invoke. 2007-12-04 13:33:10 +01:00
Rob Shearman 6dcc3fe62e rpcrt4: Put the delegating stub thunks in an executable memory page, rather than on the heap. 2007-12-04 13:32:41 +01:00
Rob Shearman 341208bf1b rpcrt4: Call IRpcChannelBuffer_GetDestCtx in NdrStubInitialize, just like we do in NdrProxyInitialize. 2007-12-04 13:32:29 +01:00
Rob Shearman f191f59ee4 rpcrt4: Flesh out more of the IRpcChannelBuffer vtable to make the test_delegating_Invoke test succeed on Windows. 2007-12-04 13:31:59 +01:00
Rob Shearman 620fca405d rpcrt4: Test that the string retrieved from get_name was actually unmarshalled correctly. 2007-12-03 13:10:21 +01:00
Rob Shearman d8e467b0fd rpcrt4: Reverse the conditions for which *pPointer is assigned base_ptr_val in PointerUnmarshall.
In one condition (fMustAlloc == TRUE), base_ptr_val may be uninitialised
and so cause a valgrind warning. Reversing the check is harmless and
doesn't result in a performance decrease.
2007-12-03 13:10:21 +01:00
Rob Shearman eef207e3f1 rpcrt4: Initialise the memory in test_simple_struct_marshal before passing it to NdrSimpleStructUnmarshall.
Otherwise, the unmarshalling code will read from unintialised memory
when trying to reuse the embedded pointers in the memory block.

Also fix a couple of memory leaks.
2007-12-03 13:10:21 +01:00
Rob Shearman c735a14788 rpcrt4: Fix NdrSimpleStructUnmarshall to cope with [in, out] embedded pointers. 2007-11-30 11:56:30 +01:00
Rob Shearman b676309db3 rpcrt4: Improve PointerUnmarshall to cope with keeping the non-NULL source pointer of a client unmarshall.
This will enable various types with embedded pointers to handle [in,out] 
parameters correctly by keeping the existing memory.
2007-11-30 11:56:21 +01:00
Rob Shearman 4e8f69ac2d rpcrt4: Move forcing of fMustAlloc to NULL to the callers of EmbeddedPointerUnmarshall.
This will enable them to be individually fixed up to use memory if it 
was provided by the caller.
2007-11-30 11:56:11 +01:00
Rob Shearman 43e0c67fe2 rpcrt4: EmbeddedPointerUnmarshall doesn't need to change the address of the allocated memory, so reduce the level of indirection of the memory parameter by one. 2007-11-30 11:56:04 +01:00
Rob Shearman 34522de870 rpcrt4: Errors in sending or receiving packets should result in RPC_S_CALL_FAILED being returned, not RPC_S_PROTOCOL_ERROR. 2007-11-30 11:55:50 +01:00
Rob Shearman 8668369b4f rpcrt4: Fix an integer overflow in NdrConformantStructMarshall and NdrConformantStructUnmarshall. 2007-11-29 13:31:05 +01:00
Rob Shearman 074898ba2b rpcrt4: Fix some more potential buffer overflows. 2007-11-29 13:30:58 +01:00
Rob Shearman 5a3c34eb89 rpcrt4: Check there is enough space in the buffer and that the size doesn't cause an overflow when copying data to it. 2007-11-29 13:30:21 +01:00
Rob Shearman d0223ecc0e rpcrt4: Check for integer overflows when increasing the buffer length.
Rename safe_buffer_copy to safe_copy_from_buffer.
2007-11-29 13:30:04 +01:00
Rob Shearman 4171309731 rpcrt4: Fix the tests for up_enum16.
It is different to the other base types as it has a different size on 
the wire to in memory, so it can't just be set to the buffer when 
unmarshalling.
2007-11-27 16:42:17 +01:00
Michael Stefaniuc 61ed0c99e6 rpcrt4: socket() returns -1 on error so check the return value against that. 2007-11-27 12:29:45 +01:00
Rob Shearman 046f24a0e7 rpcrt4: Raise an exception if a NULL ref-pointer is passed in to PointerMarshall or PointerBufferSize. 2007-11-21 12:03:35 +01:00
Rob Shearman 8a15423ab7 rpcrt4: Hold the thread-data's critical section while cancelling a call.
Check that there is a connection before trying to cancel it.
2007-11-19 13:53:22 +01:00
Francois Gouget 4fddc5e726 rpcrt4: Add some missing prototypes and better match the PSDK types. 2007-11-13 23:28:06 +01:00
Rob Shearman 3634dc1b1c rpcrt4: Fix a copy and paste mistake in declaring threaddata_cs_debug.
Reported by Hans Leidekker.
2007-11-13 23:28:05 +01:00
Francois Gouget b6ad7b5ef7 rpcrt4: Add an API documentation stub to make winapi_check happy. 2007-11-13 13:37:24 +01:00
Rob Shearman a51486c657 rpcrt4: Implement RpcCancelThread for the ncacn_ip_tcp protocol sequence. 2007-11-13 13:34:50 +01:00
Rob Shearman 7ad36eabfc rpcrt4: Add stubs for RpcMgmtSetCancelTimeout and RpcCancelThread. 2007-11-07 11:57:25 +01:00
Rob Shearman ebe885d782 rpcrt4: Add a stub for RpcErrorStartEnumeration. 2007-11-07 11:57:20 +01:00
Dan Hipschman a0ac63961d widl: Don't rely on type_memsize to return 0 for all conformant arrays. 2007-11-06 13:02:56 +01:00
Rob Shearman 04dc115b54 rpcrt4: Handle FC_IGNORE in the base type functions. 2007-11-05 15:06:06 +01:00
Dan Hipschman 8d15820f79 widl: Handle pointers to conformant arrays (e.g., "[size_is(, n)] int **p; "). 2007-11-05 13:24:37 +01:00
Dan Hipschman 8caa325eb7 rpcrt4: Initialize allocated pointers to NULL in PointerUnmarshall.
This patch initializes allocated pointers in PointerUnmarshall since later
code checks the value for NULL (specifically, NdrConformantArrayUnmarshall).
2007-11-05 13:24:36 +01:00
Dan Hipschman eaffc0a0da rpcrt4/tests: Initialize memory in the get_name test.
This initializes the memory for an [in] parameter.
2007-11-05 13:24:36 +01:00
Rob Shearman c4a1a081a9 rpcrt4: Factorise out the argument processing from NdrStubCall2 into two functions. 2007-11-05 13:24:36 +01:00
Rob Shearman 83bc80ada0 rpcrt4: Move some type definitions from ndr_stubless.c to ndr_stubless.h. 2007-11-05 13:24:36 +01:00
Rob Shearman 3eac5b4e59 rpcrt4: Add a small bit of documentation as to what NdrStubCall2 does. 2007-11-05 13:24:36 +01:00
Rob Shearman 18c16a8027 rpcrt4: Add a test for the pointers in [in,out] pointer structs not changing when the pointers aren't NULL. 2007-11-02 12:37:35 +01:00
Gerald Pfeifer 826a6d09d4 rpcrt4: Initialize variable to avoid compiler warning. 2007-10-25 12:48:01 +02:00
Dan Hipschman ff8930f2bf widl: Fix problems with variable-size user types. 2007-10-22 13:47:56 +02:00
Dan Hipschman 1d0f9378bc widl: Detect conformant arrays of user types correctly. 2007-10-18 12:09:23 +02:00
Dan Hipschman e219087c65 rpcrt4/tests: Free memory from one of the tests. 2007-10-15 16:55:31 +02:00
Dan Hipschman acfde97b9e rpcrt4, widl: Make pointer layouts compatible with windows; fix conformant array tests. 2007-10-11 16:24:28 +02:00
Dan Hipschman d00ff2ed58 widl: Make structs containing user types bogus; fix square_test_us test failure. 2007-10-09 11:39:26 +02:00
Dan Hipschman e0b209815d rpcrt4/tests: Make server.idl compatible with MIDL. 2007-10-09 11:39:21 +02:00
Alexandre Julliard b7df430831 rpcrt4/tests: Remove static keywords that hide test failures. 2007-09-27 20:13:21 +02:00
Dan Hipschman 723c8bacfa widl: Fix string codes in pointer descriptions. 2007-09-27 10:09:38 +02:00
Dan Hipschman 347f2a2da2 widl: Fix top-level conformant arrays with pointer attributes. 2007-09-27 10:09:32 +02:00
Dan Hipschman 767a1f26f6 widl: Handle top-level conformance for complex arrays. 2007-09-20 14:27:29 +02:00
Dan Hipschman dbfabf68a2 widl: Respect pointer attributes better. 2007-09-20 14:27:25 +02:00
Dan Hipschman 132f06cd48 widl: Implement complex arrays. 2007-09-19 11:39:09 +02:00
Dan Hipschman 8df79f0c99 widl: Implement pointer descriptions for complex structures. 2007-09-19 11:38:28 +02:00
Rob Shearman f67a6adf4e rpcrt4: Implement RpcSmDestroyClientContext and RpcSsDestroyClientContext. 2007-09-19 11:36:41 +02:00
Rob Shearman 5191498564 rpcrt4: Fix a copy-and-paste error in RpcAuthInfo_Release that caused a double free of memory. 2007-09-19 11:36:28 +02:00
Dan Hipschman 5e84eb9a47 widl: Add padding to the end of complex structures. 2007-09-14 14:43:13 +02:00
Rob Shearman 2eb0e1ce21 rpcrt4: Fix a trace in RPCRT4_SecurePacket. 2007-09-12 11:33:11 +02:00
Rob Shearman e0e27e4dfb rpcrt4: Correctly handle the failure of RPCRT4_SecurePacket in RPCRT4_Receive. 2007-09-12 11:33:10 +02:00
Dan Hipschman ba54c455fb widl: Allow size_is on strings. 2007-09-10 15:29:46 +02:00
Dan Hipschman 62fb623e14 widl: Implement NDR for struct field alignment. 2007-09-10 15:29:46 +02:00
Dan Hipschman 3d036da6d3 widl: Fix top-level and callback conformances. 2007-09-10 15:29:46 +02:00
Andrew Talbot 04e0986d60 rpcrt4: Constify some variables. 2007-08-22 11:58:13 +02:00
Andrew Talbot fa3d623882 rpcrt4: Constify some variables. 2007-08-20 11:56:05 +02:00
Rob Shearman 8a87d916b4 rpcrt4: Convert bind ack and nack reject reasons into RPC status codes when binding. 2007-07-23 11:48:13 +02:00
Dmitry Timoshkov 12d3905427 rpcrt4: Fix the buffer bounds check. 2007-07-19 12:03:50 +02:00
Rob Shearman d212adbf10 rpcrt4: Add some more RPC to NCA status code mappings.
Add RPC_S_SEC_PKG_ERROR to the list of "hard" errors.
2007-07-18 12:56:16 +02:00
Rob Shearman 2703059933 rpcrt4: Never allocate memory for the discriminant in union_arm_unmarshall as the memory is part of the union and has already been allocated. 2007-07-16 22:46:59 +02:00
Rob Shearman b44c16cc8d rpcrt4: Check to make sure there is enough data in the buffer during unmarshalling, so that the code doesn't try to read beyound the end of the buffer. 2007-07-16 22:46:55 +02:00
Rob Shearman 686c0f094c rpcrt4: Even though FC_ENUM16 is an unsigned type, the highest allowable value that can be marshalled is SHRT_MAX, not USHRT_MAX. 2007-07-16 22:46:47 +02:00
Rob Shearman c6dc14d81b rpcrt4: Make binding to an interface a function of RpcAssoc instead of
binding handles, since binding requires information from the
association and not from the binding handle.
2007-07-13 12:27:17 +02:00
Rob Shearman 69eeb8b1b7 rpcrt4: Return a fault packet if the proc num exceeds the index of the last function available for the interface. 2007-07-05 19:53:53 +02:00
Rob Shearman 234b8cbe0a rpcrt4: Call RPCRT4_Send directly from PKT_RECEIVE handler in server.
Remove the WINE_RPCFLAG_EXCEPTION hack to pass exception information to 
I_RpcSend.
2007-07-05 19:53:47 +02:00
Rob Shearman 9c77d7ac1f rpcrt4: Translate between NCA and RPC status codes. 2007-07-05 19:53:29 +02:00
Rob Shearman 67c8fa58ec rpcrt4: Store the assoc_group_id in the connections. 2007-06-27 12:32:43 +02:00
Rob Shearman 9787f12589 rpcrt4: Make pointers to RPCRT4_BuildBindHeader and RPCRT4_BuildBindAckHeader const. 2007-06-27 12:32:43 +02:00
Rob Shearman 680e35643d rpcrt4: Remove the unused AuthInfo field from the RpcAssoc structure and Used from RpcConnection. 2007-06-27 12:32:42 +02:00
Dan Hipschman 46222aee6e widl: Allow enums as union switch types. 2007-06-26 11:59:53 +02:00
Dan Hipschman ea7b1694de rpcrt4: Allow enums as union switch types. 2007-06-26 11:59:43 +02:00
Dan Hipschman 076a6206ff rpcrt4/tests: Wrap a try/except block around tests. 2007-06-26 11:59:32 +02:00
Dan Hipschman 512c36cae6 widl: Get simple enums working. 2007-06-26 11:59:02 +02:00
Rob Shearman 545c2a95f6 rpcrt4: Dereference the pointer passed to the marshaling/unmarshaling/sizing routines in complex types for interface pointers. 2007-06-25 23:21:55 +02:00
Rob Shearman fc124eca6e rpcrt4: Implement marshalling, unmarshalling and buffer sizing for the context handle type. 2007-06-25 23:21:55 +02:00
Rob Shearman d36f02eaa9 rpcrt4: Implement marshalling/unmarshalling for the range NDR type. 2007-06-25 23:21:54 +02:00
Rob Shearman 4174255e0c rpcrt4: Set PointerBufferMark to the buffer location immediately after the non-pointer data in complex struct and array marshaling and unmarshaling to keep to the DCE/RPC specification. 2007-06-25 23:21:54 +02:00
Rob Shearman cbafe663b0 rpcrt4: Try a lot harder to resuse existing connections by comparing inside the RpcQualityOfService and RpcAuthInfo objects.
Store a copy of the SEC_WINNT_AUTH_IDENTITY structure passed in to
RpcBindingSetAuthInfo(Ex) to enable us to do this for RpcAuthInfo objects.
2007-06-25 23:21:54 +02:00
Rob Shearman 0ebcacca39 rpcrt4: Store the assoc_group_id field returned from the bind_ack packet and use it when creating further connections in the association group. 2007-06-25 23:21:53 +02:00
Rob Shearman 62c49bdd18 rpcrt4: When an exception is raised, return the stored exception code instead of the generic RPC_S_CALL_FAILED. 2007-06-25 23:21:53 +02:00
Rob Shearman 2de3d31a7a rpcrt4: Translate STATUS_ACCESS_VIOLATION exceptions caught whilst executing the stub function to ERROR_NOACCESS to prevent confusing exceptions occurring in the client. 2007-06-25 23:21:53 +02:00
Rob Shearman c411d95e20 rpcrt4: Close the connection if a protocol error or certain other kinds of errors occur, instead of returning it to the connection pool. 2007-06-25 23:21:53 +02:00
Rob Shearman 0d05685b68 rpcrt4: Return a fault packet if the interface/object pair in a request packet aren't registered. 2007-06-25 23:21:52 +02:00
Rob Shearman 903fb72b21 rpcrt4: Add a STUBLESS_FREE phase for freeing the allocated memory in the server function. 2007-06-25 23:21:52 +02:00
Rob Shearman a1dca20dd7 rpcrt4: Add support for ServerAllocSize parameters. 2007-06-25 23:21:52 +02:00
Rob Shearman 73c31ed309 rpcrt4: Don't use add on the sizes of array elements to an open-ended structure; use FIELD_OFFSET with the array index instead. 2007-06-25 23:21:52 +02:00
Dan Hipschman 4e8c8d03e5 widl: Add tests for arrays of pointers. 2007-06-21 13:10:46 +02:00
Rob Shearman 0f826e7cc1 rpcrt4: Use the offset to array data in embedded pointer format descriptions. 2007-06-20 13:08:30 +02:00
Dan Hipschman d2c15ed01b rpcrt4: Fix typo in union buffer size calculation. 2007-06-19 11:46:02 +02:00
Dan Hipschman 6fd05b1dc7 rpcrt4: Fix bug calculating union switch type. 2007-06-19 11:45:51 +02:00
Dan Hipschman b09b917a5c rpcrt4: Remove inaccurate comments. 2007-06-19 11:45:44 +02:00
Dan Hipschman 08c846a9da rpcrt4: Add encapsulated union tests. 2007-06-19 11:45:11 +02:00
Rob Shearman 0871ab9130 rpcrt4: Implement encapsulated union NDR functions. 2007-06-18 13:58:09 +02:00
Dan Hipschman 3325020636 widl: Handle wire_marshal pointer attributes. 2007-06-14 11:36:05 +02:00
Dan Hipschman 2bc8808be1 widl: Test structure argument marshalling. 2007-06-14 11:35:55 +02:00
Dan Hipschman c0982b42c5 widl: Handle wire_marshal types. 2007-06-14 11:35:44 +02:00
Dan Hipschman 88c8128704 widl: Simplify correlation descriptor code. 2007-06-12 11:13:30 +02:00
Dan Hipschman 8f689ee023 widl: Implement conformant structure handling. 2007-06-06 12:13:35 +02:00
Dan Hipschman 978b4d4f4e widl: Represent arrays with type_t. 2007-06-06 12:13:16 +02:00
Dan Hipschman e5c8a6eb5d rpcrt4: Fix build of test on Solaris by renaming a variable. 2007-05-31 13:07:13 +02:00
Francois Gouget 8d7ad785e3 rpcrt4/tests: Fix a Visual C++ double to float conversion warning. 2007-05-29 13:46:19 +02:00
Francois Gouget f27a7153a5 rpcrt4/tests: Fix signed/unsigned and 32/64bit issues with the wiredatalen parameter. 2007-05-29 13:46:14 +02:00
Dmitry Timoshkov 3c9e7a7f33 wine: Switch to using 'long' for INT_PTR type for 64-bit compatibility. 2007-05-25 20:37:56 +02:00
Dan Hipschman 8f7a5d63ec widl: Allow types that reference themselves. 2007-05-25 19:36:12 +02:00
Dan Hipschman 00ce411231 widl: Handle pointers in unions.
Unify write_pointers with write_embedded_types, and handle pointers in
unions.  Includes tests.
2007-05-25 19:35:29 +02:00
Dan Hipschman b4e8073f8c rpcrt4: Fix test typo. 2007-05-25 19:35:02 +02:00
Dan Hipschman c5aaadc4c8 widl: Lay framework for unions with simple unions working. 2007-05-21 12:40:58 +02:00
Andrew Talbot d5d056ef75 rpcrt4: Exclude unused headers. 2007-05-18 14:11:22 +02:00
Dan Hipschman 52ca3ebada widl: Write some structures to the type format string on the fly. 2007-05-16 13:33:17 +02:00
Dan Hipschman d9c120490f widl: Handle pointers fields that point to structures. 2007-05-14 14:24:16 +02:00
Dan Hipschman ef433e2792 widl: Remove var_t's ptr_level field and start write_pointers. 2007-05-11 12:33:27 +02:00
Rob Shearman 35e99b50f1 rpcrt4: Print the correct values when warning about a bad frag length. 2007-04-30 12:33:19 +02:00
Dan Hipschman ba17c25e62 rpcrt4: Add a testcase for RPCs with fixed-size arrays. 2007-04-26 16:12:23 +02:00
Dan Hipschman cc09b0c19c rpcrt4: Add tests for RPC and widl generated code. 2007-04-26 15:48:13 +02:00
Dan Hipschman 6c5e78fe03 rpcrt4: Add tests for RpcServerListen and friends. 2007-04-13 11:42:42 +02:00
Francois Gouget 0081b430e1 Assorted spelling and English fixes. 2007-04-03 11:23:12 +02:00
Rob Shearman 173590a664 rpcrt4: Fixing the using of the auth_len values the wrong way round - PKT_PRIVACY implies the packet will be encrypted, not just signed. 2007-03-28 12:14:18 +02:00
Rob Shearman 763fe63213 rpcrt4: Use the correct authorization trailer length using information from the security provider.
Previously it was hardcoded to 16, so only the NTLM provider would work correctly.
2007-03-27 13:00:00 +02:00
Rob Shearman 88295b9a02 rpcrt4: Call CompleteAuthToken if InitializeSecurityContext returned a code that says it should be called.
Currently, the only security provider that requires this is the Digest 
one, which we don't really care about, but is supported for completeness.
2007-03-27 12:59:42 +02:00
Rob Shearman 88e9b3fad8 rpcrt4: Call InitializeSecurityContext from only one function.
This reduces the amount of code and ensures that the parameters passed 
to it stay the same, apart from the previous context and the output 
buffer description.
2007-03-27 12:42:05 +02:00
Rob Shearman 7abb647cd3 rpcrt4: Retrieve the maximum token length from the security provider rather than using a hardcoded and rather small limit. 2007-03-27 12:41:54 +02:00
Rob Shearman 7e061e4f64 rpcrt4: Make some parameters of non-exported functions const. 2007-03-27 12:39:18 +02:00
Rob Shearman adb7cca85c rpcrt4: Implement associations which are intermediary objects that track the relationship between the client and a given endpoint on the server.
Use these to encapsulate the connection pool so that the lifetimes of 
connections are properly handled again.
2007-03-27 12:39:05 +02:00
Andrew Talbot 67813450b9 rpcrt4: Replace inline static with static inline. 2007-03-23 12:29:52 +01:00
Rob Shearman 8620d15d39 rpcrt4: Unmarshal NULL OLE interfaces properly by handling the case of a 0 stream size. 2007-03-14 18:49:49 +01:00
Huw Davies 6fcff278b3 rpcrt4: Tests that show that the allocation rules for unmarshaling a conformant array are the same as those for a simple structure. 2007-03-13 11:52:37 +01:00
Francois Gouget d3245723ae rpcrt4: Fix a file handle leak in RPCRT4_RPCSSOnDemandCall().
Also, RPCRT4_RpcssNPConnect() returns a file handle so treat it as
such by checking it against INVALID_HANDLE_VALUE and not NULL.
2007-03-08 21:31:07 +01:00
Alexandre Julliard 9dd1f1e341 Added version information for a number of dlls. 2007-03-07 21:25:16 +01:00
Rob Shearman 55a103ca5c rpcrt4: Use IPPROTO_TCP for SOL_TCP if SOL_TCP isn't defined.
Fixes compilation on *BSD systems.
2007-03-01 20:42:50 +01:00
Rob Shearman 829dfa8052 rpcrt4: Set TCP_NODELAY on the socket for the ncacn_ip_tcp transport to reduce latency. 2007-02-28 13:28:40 +01:00
Rob Shearman ca6fe3fbf2 rpcrt4: Fix a memory leak in I_RpcSendReceive caused by I_RpcReceive overwriting pMsg->Buffer.
(Reported by Huw Davies.)
2007-02-21 19:48:51 +01:00
Rob Shearman b491d926d5 rpcrt4: Add documentation for the I_Rpc* RPC message functions. 2007-02-21 19:48:44 +01:00
Rob Shearman b6d8b27be5 rpcrt4: The format structures used in the marshaling code should have 1-byte alignment. 2007-02-12 15:20:52 +01:00
Alexandre Julliard 639ffbfde7 rpcrt4: Enter new named pipe connections into the protocol connection list. 2007-02-12 14:13:22 +01:00
Francois Gouget 45d5ff01a6 rpcrt4: Better match the PSDK types and fix the winapi_check warnings. 2007-02-07 21:42:02 +01:00
Francois Gouget 62662d21dd rpcrt4: Improve the prototypes Win64 compatibility by replacing long with LONG. 2007-02-06 13:23:53 +01:00
Andrew Talbot 3bc14d9110 rpcrt4: Declare some functions static. 2007-01-25 12:04:18 +01:00
Rob Shearman 399844e9f6 rpcrt4: RPCRT4_strdupWtoA and RPCRT4_strdupAtoW don't change the input string, so make the input const. 2007-01-25 12:00:13 +01:00
Rob Shearman 961455c7f0 rpcrt4: Stash away NetworkOptions passed in from the binding string so that transports can look at the string if needed. 2007-01-25 12:00:10 +01:00
Rob Shearman d05f5f33a4 rpcrt4: When copying quality of service, deep copy TransportCredentials structure too.
Remove some no longer relevant fixmes.
2007-01-24 12:07:24 +01:00
Rob Shearman 2103bca4db rpcrt4: Fix a typo in rpcrt4_conn_open_pipe.
Fix a typo in rpcrt4_conn_open_pipe where the initial setting of dwFlags 
was done inside the switch statement instead of at the indented place of 
at the start of the block (thanks to Jan Zerebecki for noticing this bug).
2007-01-24 12:07:14 +01:00
Huw Davies e3abd2b3ff rpcrt4: Implement NdrSimpleType{Marshall,Unmarshall}. 2007-01-24 11:59:01 +01:00
Rob Shearman e6f4514512 rpcrt4: Try to avoid partial named pipe read/writes by looping. 2007-01-23 11:38:23 +01:00
Rob Shearman 9fb15b4105 rpcrt4: Make the fixme for an unhandled packet type more useful by printing the code of the unhandled packet type. 2007-01-23 11:38:16 +01:00
Rob Shearman 0debcf5b1e rpcrt4: Handle security quality of service flags relevant to the ncacn_np protocol. 2007-01-22 12:01:57 +01:00
Rob Shearman 4b79a0252a rpcrt4: Track the security quality of service settings for bindings and connections. 2007-01-22 12:01:54 +01:00
Joel Parker 2319999a05 Remove redundant semicolons for ANSI compatibility. 2007-01-17 11:58:15 +01:00
Paul Vriens c21d65cfb2 rpcrt4/tests: Cast-qual warning fixes. 2007-01-12 20:41:22 +01:00
Francois Gouget fa7c32f56c rpcrt4: Give a proper name to some formerly reserved MIDL_STUB_MESSAGE fields.
Define NTDDI_VERSION so we get definitions for the Reserved51_X fields with the PSDK.
This fixes compilation of the ndr_marshall.c with the PSDK.
2007-01-11 11:37:13 +01:00
Francois Gouget f43b549081 rpcrt4/tests: Remove an unneeded '#if 0' and fix the code so it compiles without warnings. 2007-01-08 12:08:03 +01:00
Francois Gouget 9f586f1b79 rpcrt4/tests: Replace some '#if 0's with 'if (0)'s, or remove them if not needed anymore.
Fix the code so it compiles without warnings.
2007-01-08 12:07:59 +01:00
Rob Shearman 98c87d0e70 rpcrt4: Pass WT_EXECUTELONGFUNCTION to QueueUserWorkItem since the
function being called can sometimes take a long time to return and we
almost always want a new thread to be created if there are no free
threads available.
2007-01-04 21:13:49 +01:00
Rob Shearman 776f81b3be rpcrt4: A NULL IfSpec in RpcServerUnregisterIf should remove all interfaces, not crash. 2007-01-02 20:49:04 +01:00
Rob Shearman 48344f505b rpcrt4: Free the resource allocated by InitializeSecurityContext when the connection is closed. 2006-12-18 11:45:51 +01:00
Dmitry Timoshkov 8c3fdfea42 rpcrt4: Make some data const. 2006-12-14 20:11:34 +01:00
Andrew Talbot 82a042d0df rpcrt4/tests: Cast-qual warnings fix. 2006-12-14 12:51:10 +01:00
Marcus Meissner f0280cbd1e made functions and variables static in some testcases. 2006-12-11 12:18:29 +01:00
Francois Gouget bb8e625b5b Assorted spelling fixes. 2006-12-05 10:31:47 +01:00
Rob Shearman 06dd3efe2f rpcrt4: RPC_C_AUTHN_LEVEL_NONE and RPC_C_AUTHN_LEVEL_DEFAULT are
handled at the binding level now instead of the message level, so
remove this special handling in RPCRT4_Send.
2006-11-22 11:37:15 +01:00
Rob Shearman 20c53a77e2 rpcrt4: Allow applications to specify authentication levels other than connect in RpcBindingSetAuthInfoA/W.
Map the default authentication level and service to sane values.
Don't create an RpcAuthInfo object if RPC_C_AUTHN_LEVEL_NONE is specified.
2006-11-22 11:37:08 +01:00
Rob Shearman 8bb10f1082 rpcrt4: Use SecInvalidateHandle and SecIsValidHandle for handling RpcConnection::ctx instead of setting/comparing the field to 0. 2006-11-15 11:25:57 +01:00
Rob Shearman 51dd6f9fb8 rpcrt4: Add support for signing, verifying, encrypting and decrypting RPC packets. 2006-11-15 11:25:53 +01:00