Commit Graph

122 Commits

Author SHA1 Message Date
Alexandre Julliard 749f22948c rpcrt4: Implement waiting in RpcMgmtWaitServerListen. 2010-11-10 10:00:35 +01:00
Alexandre Julliard 95ea352738 rpcrt4: Remove a couple of unused local variables. 2010-09-01 14:01:04 +02:00
Rob Shearman a65f7b637a rpcrt4: Process control packets in the server synchronously to avoid races when using 3-factor authentication.
The client has nothing to wait for after sending the AUTH3 packet
before sending the first request packet. Therefore, we must ensure
that the AUTH3 packet has finished being processed before we start
processing any request packets.
2009-12-14 12:19:09 +01:00
Rob Shearman e27e61db71 rpcrt4: Add support for server-side authentication. 2009-12-14 12:19:02 +01:00
Rob Shearman 6ad4d5922b rpcrt4: Implement RpcServerRegisterAuthInfoA/W. 2009-12-14 12:18:41 +01:00
Rob Shearman eb0d2828b2 rpcrt4: Fix potential NULL pointer access in process_bind_packet.
Upon failure to allocate results in process_bind_packet, build nack
packet and send right away, instead of falling into the normal path
and potentially dereferencing the NULL pointer.
2009-11-16 11:34:58 +01:00
Rob Shearman a638bff53d rpcrt4: Stop searching through transfer syntaxes in process_bind_packet when one has been found.
Fixes Valgrind errors in various tests using RPC.
2009-11-12 13:13:26 +01:00
Rob Shearman 59ba6d2573 rpcrt4: Support multiple interfaces and transfer syntaxes in bind and bind ack messages. 2009-11-11 10:56:13 +01:00
Rob Shearman 317edfd7da rpcrt4: Free the memory allocated for the protseq and endpoint strings allocated in RpcServerUseProtseq* functions.
Make a copy of the protseq string in alloc_serverprotoseq to simplify
memory management in higher-level functions.
2009-03-30 13:58:01 +02:00
Rob Shearman 4d8057ffef rpcrt4: RpcServerUseProtseqEp(..., NULL, ...) should return RPC_S_OK.
However, on some buggy platforms it returns
RPC_S_INVALID_ENDPOINT_FORMAT. Don't follow this behaviour our
implementation of the API.
2009-03-30 13:57:54 +02:00
Rob Shearman 375c68a043 rpcrt4: Re-use already registered endpoints for a protocol sequence.
Return RPC_S_INVALID_ENDPOINT_FORMAT if a NULL endpoint is passed into
RpcServerUseProtseqEp{,Ex}{A,W}.
2009-03-26 16:10:49 +01:00
Rob Shearman 7208067492 rpcrt4: Simplify some code in RpcServerInqBindings by changing while loops into for loops. 2009-03-23 14:54:07 +01:00
Rob Shearman 5e1d10d423 rpcrt4: Free the resources associated with server protocol sequences on DLL unload. 2009-03-23 14:54:01 +01:00
Michael Stefaniuc e3bb1c8243 rpcrt4: Remove superfluous pointer casts. 2009-02-16 16:01:37 +01:00
Michael Stefaniuc 4c7a6694cd include: Change unsigned long to ULONG in rpcdce.h for Win64 compatibility.
Also fix the compiler warnings introduced by this change.
2009-01-04 13:34:51 +01:00
Michael Stefaniuc e86eb8efa6 include: Change RPC_STATUS from long to LONG for Win64 compatibility.
Also fix the compiler warnings introduced by this change.
2009-01-04 13:34:38 +01:00
Alexandre Julliard 83b6c8a5fa rpcrt4: Convert source files to utf-8. 2008-10-18 19:20:44 +02:00
Hans Leidekker e511474d47 rpcrt4: Add stub implementations for RpcMgmtInqStats and RpcMgmtStatsVectorFree. 2008-09-23 14:03:19 +02:00
Rob Shearman 34dd534250 rpcrt4: Fix memory leak of 0-byte buffer allocated during processing of bind packets.
In this case conn->server_binding will be NULL and consequently
bind->Handle will be NULL, causing I_RpcFreeBuffer to fail. Therefore
just use I_RpcFree to free the buffer as that is just what
I_RpcFreeBuffer does under the hood anyway.
2008-09-12 16:49:56 +02:00
Rob Shearman ffd37b0eec rpcrt4: Fix memory leaks of hdr in error paths in RPCRT4_io_thread. 2008-09-12 16:49:52 +02:00
Rob Shearman 8cc3adea52 rpcrt4: Free the memory for a registered interface that is in use and when WaitForCallsToComplete is 0. 2008-09-12 16:49:42 +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 db6a901bf4 rpcrt4: Assign to structs instead of using memcpy. 2008-03-14 11:21:29 +01:00
Rob Shearman 8608e895eb Add a new convenience macro for an exception handler that handles all exceptions.
When using native compiler exceptions, the previous method of doing 
this, __EXCEPT(NULL), would expand to __except( 
(NULL)(GetExceptionInformation())) which doesn't compile as NULL isn't a 
function.

So add a new macro, __EXCEPT_ALL, which works correctly both when using 
native compiler exceptions and without and which makes the meaning of 
code in which it is used clearer.
2008-02-16 14:58:24 +01:00
Rob Shearman a82f4dd9b7 Don't use GetExceptionCode and GetExceptionInformation in exception filter functions.
When using native compiler exceptions, it isn't valid to use 
GetExceptionCode and GetExceptionInformation anywhere other than in the 
filter or handler blocks since it would be very hard for the compiler to 
work out where to retrieve the exception information from on the stack.

Therefore, remove the WINE_EXCEPTION_FILTER and WINE_FINALLY_FUNC macros 
which enabled GetExceptionCode, GetExceptionInformation and 
AbnormalTermination to be used inside of the functions they declared and 
fix up all callers to access the information directly.
2008-02-16 14:57:44 +01:00
Rob Shearman 1ceef1e149 rpcrt4: Fix potential memory leaks on error paths in RPCRT4_io_thread. 2008-02-05 12:19:37 +01:00
Rob Shearman a04641c15b rpcrt4: Split RPCRT4_process_packet out into separate functions. 2008-01-11 12:25:59 +01:00
Rob Shearman 5be085dec5 rpcrt4: Fix a leak of msg in RPCRT4_io_thread on the error paths. 2008-01-09 12:25:56 +01:00
Rob Shearman af4639f74a rpcrt4: Improve error handling in RPCRT4_io_thread and remove commented-out code. 2008-01-08 14:02:56 +01:00
Rob Shearman d0f914befc rpcrt4: Bind to the server interface in I_RpcGetBuffer, not I_RpcSendReceive.
The actual sending of the request is still done in I_RpcSendReceive though.

Disallow the server from calling I_RpcSend and I_RpcReceive to allow 
simplification of the code. The releasing of the connection is now done 
in I_RpcFreeBuffer.

Implement I_RpcNegotiateTransferSyntax.
2008-01-08 14:00:50 +01:00
Rob Shearman c8b3dc40a4 rpcrt4: Update todos. 2008-01-07 12:02:52 +01:00
Rob Shearman 51c051c0c4 rpcrt4: Keep a track of server context handles allocated during processing of a request.
Release them after processing of a request has finished to avoid a slow 
memory leak if the association isn't released for ages.
2007-12-31 17:13:55 +01:00
Rob Shearman 1cb7df8a98 rpcrt4: Implement I_RpcGetCurrentCallHandle. 2007-12-18 19:48:19 +01:00
Rob Shearman bdc5a34196 rpcrt4: Add a stub for I_RpcGetCurrentCallHandle. 2007-12-18 12:32:55 +01:00
Rob Shearman 737510eeb6 rpcrt4: Move association code into a separate file. 2007-12-17 11:59:18 +01:00
Rob Shearman 22f530c835 rpcrt4: Make a server association when a bind packet is received in the server.
Support handing out association group IDs.
2007-12-17 11:59:13 +01:00
Gerald Pfeifer 826a6d09d4 rpcrt4: Initialize variable to avoid compiler warning. 2007-10-25 12:48:01 +02:00
Andrew Talbot 04e0986d60 rpcrt4: Constify some variables. 2007-08-22 11:58:13 +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
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 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 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
Andrew Talbot d5d056ef75 rpcrt4: Exclude unused headers. 2007-05-18 14:11:22 +02:00
Andrew Talbot 67813450b9 rpcrt4: Replace inline static with static inline. 2007-03-23 12:29:52 +01:00
Francois Gouget 62662d21dd rpcrt4: Improve the prototypes Win64 compatibility by replacing long with LONG. 2007-02-06 13:23:53 +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 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