Commit Graph

910 Commits

Author SHA1 Message Date
Rob Shearman 4bde42aaa2 rpcrt4: Use abrtitrary pointer identifiers when marshalling pointers instead of using pointer values.
This ensures that no information about the server memory layout is
leaked to clients.
2008-06-21 11:12:58 +02:00
Rob Shearman 6cf9e441ad rpcrt4: Initialise UniquePtrCount in NdrClientInitializeNew. 2008-06-21 11:12:54 +02:00
Rob Shearman 52911fc66c include: Update the MIDL_STUB_MESSAGE structure.
Reduce the size of the IsClient field, as is done in the latest SDKs
to fix NdrClientInitializeNew tests on XP SP3 and Win2003+.
2008-06-19 11:54:49 +02:00
Rob Shearman 6bb26abe81 rpcrt4: Make RpcAssoc_BindConnection use RPCRT4_ReceiveWithAuth instead of RPCRT4_Receive.
Move the special handling of the PKT_BIND_ACK packet from
RPCRT4_ReceiveWithAuth to RpcAssoc_BindConnection, where it belongs.
2008-06-19 11:44:28 +02:00
Rob Shearman 6bb03d7dba rpcrt4: Add new function RPCRT4_ReceiveWithAuth to receive a fragment and return the authentication data received, if any. 2008-06-19 11:44:22 +02:00
Rob Shearman dec4acd8fe rpcrt4: Rename RPCRT4_SendAuth to RPCRT4_SendWithAuth. 2008-06-19 11:44:17 +02:00
Rob Shearman 9060d2aaab Update generated packing tests using current headers. 2008-06-18 15:21:48 +02:00
Rob Shearman 3f92030e2d rpcrt4: Zero the memory of the s1 structure in test_simple_struct to avoid a Valgrind warning. 2008-06-18 13:50:08 +02:00
Rob Shearman fd8cb3f9c2 rpcrt4: Reduce the timeout of waiting on the stop event in the server test to one second.
The stop event should already be signaled by the time we get to that
point since we wait until the child processes terminate in the server
process and the stop event is signaled in the context of one of the
child processes.

Don't call RpcMgmtWaitServerListening if the call to
WaitForSingleObject failed since it is likely that s_stop() hasn't
been called and therefore the call to RpcMgmtWaitServerListening won't
ever return.
2008-06-18 13:50:01 +02:00
Rob Shearman 9ce356c966 rpcrt4: Save the previous BufferLength in test_ndr_buffer and use it when testing the expected buffer length after the NdrFreeBuffer call.
This fixes a test failure on Win2003 upwards when the allocated length
appears to be rounded up to a multiple of 4.
2008-06-18 13:49:56 +02:00
Rob Shearman c9ef063e12 rpcrt4: Fix ndr_marshall tests to cope with using pointer ids instead of using pointer values.
This fixes a number of test failures on XP SP3 and Win2003 upwards.
2008-06-18 13:49:48 +02:00
Rob Shearman 9196337e09 rpcrt4: Clear a hole in the ps1 structure in test_simple_struct. 2008-06-13 10:17:03 +02:00
Rob Shearman c82ffcec60 rpcrt4: Initialise the array to be marshalled in test_conformant_array. 2008-06-13 10:16:51 +02:00
Paul Vriens e7ef88beda rpcrt4/tests: Fix test failures for win9x, NT4, W2K and XP-SP1. 2008-06-12 12:03:30 +02:00
Rob Shearman a1a5d8d02a rpcrt4: Use RpcServerRegisterIfEx with RPC_IF_ALLOW_CALLBACKS_WITH_NO_AUTH in the server test.
This allows the test to run correctly on XP SP2 upwards instead of
failing with ERROR_ACCESS_DENIED.
2008-06-10 11:33:21 +02:00
Rob Shearman d6503215ef include: Add some missing defines and function declarations to rpcdce.h. 2008-06-10 11:33:13 +02:00
Alexandre Julliard 853db9a79d rpcrt4: Properly handle the case of a client having disconnected in rpcrt4_conn_listen_pipe. 2008-06-09 12:56:42 +02:00
James Hawkins 3978df4e52 rpcrt4: Trace the results of two statuses that return different results across platforms. 2008-05-26 18:00:08 +02:00
Maarten Lankhorst fd7b277d8a rpcrt4: Fix ndr_marshall test failures.
Created with help from Robert Shearman.
2008-05-07 20:22:56 +02:00
Rob Shearman 02c66c2312 rpcrt4: Add better traces for the server test.
Handle failure to use one or more protocol sequences more gracefully, as 
ncacn_np servers aren't support on Win9x and ncacn_ip_tcp fails on some 
machines.
2008-05-07 17:48:12 +02:00
Francois Gouget 42a61d7ed7 Assorted spelling fixes. 2008-05-06 16:10:20 +02:00
Alexandre Julliard dad21bbcbf makefiles: List the static libraries as normal imports instead of extra libs. 2008-04-30 14:23:55 +02:00
Alexandre Julliard ef07d83405 Include wine/port.h everywhere we use exceptions. 2008-04-29 20:18:49 +02:00
Rob Shearman 8e08b1dd7f rpcrt4: Use safe_copy_from_buffer instead of direct memory copy in NdrBaseTypeUnmarshall.
This makes the code check that the buffer is big enough to read from 
before copying the data from it. The safe_buffer_increment call is still 
needed for the case where we point the memory to the buffer, so move the 
call there.
2008-04-28 13:28:16 +02:00
Andrew Talbot 649c7aeb7c rpcrt4: Remove unused variables. 2008-04-25 11:28:34 +02:00
Steven Edwards d0ddece843 rpcrt4: Correct the number of aguments for fill_method on unsupported architectures. 2008-04-21 18:32:02 +02:00
Austin English aab8fae59a Spelling fixes. 2008-04-21 14:25:05 +02:00
Austin English 313a85f163 Spelling fixes. 2008-04-17 12:25:57 +02:00
Marcus Meissner bd38e2b0ed rpcrt4: Handle exit path where bind not allocated yet. 2008-04-16 14:12:30 +02:00
Rob Shearman 4efff32291 rpcrt4: Test and fix I_RpcExceptionFilter. 2008-04-16 14:07:31 +02:00
Rob Shearman e05ccfe2bb rpcrt4: Add buffer size checks to base type unmarshalling.
Reimplement NdrSimpleTypeUnmarshall using similar macros to
NdrBaseTypeUnmarshalling without buffer checks, due to
NdrSimpleTypeUnmarshall not doing any safety checks.
2008-04-14 12:40:22 +02:00
Rob Shearman 9a2914b11f rpcrt4: Implement I_RpcExceptionFilter. 2008-04-11 12:12:30 +02:00
Rob Shearman 8aeb2858e4 rpcrt4: Add a reference to the binding object in I_RpcNegotiateTransferSyntax and release the reference in I_RpcFreeBuffer.
This is needed because a context binding handle could be released on 
unmarshall, but it still needs to stay valid until the binding handle is 
no longer being used.

Re-use the previously unused RPCRT4_ExportBinding function as 
RPCRT4_AddRefBinding and rename RPCRT4_DestroyBinding to 
RPCRT4_ReleaseBinding to show that it's purpose is to release a 
reference count and destroy if necessary, not always destroy.
2008-04-01 19:11:00 +02:00
Rob Shearman c7f9b9347f rpcrt4: Improve trace in RPCRT4_find_interface to print the interface identifier data as well as the object guid. 2008-04-01 19:10:48 +02:00
Andrew Talbot 1f53b85445 rpcrt4: Void functions should not return a value. 2008-03-31 12:13:59 +02:00
Rob Shearman c06f26f2e3 rpcrt4: Print an error if an invalid client context handle is used. 2008-03-28 21:42:15 +01:00
Dan Hipschman 2fa83d94c8 widl: Make structures with FC_ENUM16 fields complex.
Structures containing enum fields without the v1_enum attribute must be
treated as complex because of the range check and memory/wire size
differences.  This includes a test which didn't pass before and now
passes on Wine and Windows.
2008-03-21 11:24:28 +01:00
Dan Hipschman 629a29d81e rpcrt4: Handle FC_ENUM16. 2008-03-21 11:24:19 +01:00
Dan Hipschman 764cf334d6 rpcrt4: Use correct count in rpcrt4_conn_np_write.
count is the total count passed into rpcrt4_conn_np_write.  If WriteFile
does a partial write it would end up writing too much subsequent times
through the loop.  All tests pass as before.
2008-03-20 14:27:34 +01:00
Rob Shearman f15287dea7 rpcrt4: Add a stub for RpcCancelThreadEx. 2008-03-17 15:20:07 +01:00
Andrew Talbot db6a901bf4 rpcrt4: Assign to structs instead of using memcpy. 2008-03-14 11:21:29 +01:00
Rob Shearman 0e7b25349d rpcrt4: Fix the pointer level being passed into call_unmarshaller in client_do_args_old_format for base return parameters.
NdrBaseTypeUnmarshall expects a pointer to a pointer to a base type. 
pRetVal contains a pointer to a base type, so we need to pass the 
address of pRetVal into call_unmarshaller here.
2008-03-10 19:25:55 +01:00
Rob Shearman 259ccc573c rpcrt4: Fix -Oi interpreter for base types.
Don't call memory sizing rountines to compute the size of a type, since
memory sizing routines have side effects like checking there is enough
space in the buffer for the type and incrementing the buffer pointer.
Instead, create a function which returns the necessary size of the
limited set of types we can encounter and remove call_memory_sizer which
is no longer needed.
2008-03-10 19:12:54 +01:00
Rob Shearman a5599028ea rpcrt4: Check that the input to RPCRT4_strndupW was not NULL before assuming that the string couldn't be allocated due to lack of memory. 2008-03-10 19:12:54 +01:00
Rob Shearman a1e4bcda1a rpcrt4: Use closesocket to close sockets and define it to close on Unix platforms to make the code more portable. 2008-03-06 17:39:31 +01:00
Rob Shearman 48000893f9 makefiles: Simplify the use of the IMPORTLIB variable in the DLL makefiles.
Only specify the root to keep platform-specifics out of the individual 
DLL makefiles.
2008-03-04 20:55:01 +01:00
James Hawkins 00394486df janitorial: Remove links to any microsoft site. 2008-03-01 12:03:59 +01:00
Rob Shearman 5dd2f1efa8 Include config.h and wine/port.h in files that use snprintf. 2008-02-29 12:39:28 +01:00
Paul Vriens 6832c8327d rpcrt4/tests: Make tests run on win9x/NT4 again. 2008-02-28 12:57:02 +01:00
Rob Shearman f7628b69b0 rpcrt4: Add tests for RpcStringBindingParseA. 2008-02-28 10:50:57 +01:00