Commit Graph

151 Commits

Author SHA1 Message Date
Zebediah Figura 950b349885 rpcrt4: RpcServerUnregisterIf() with NULL ifspec shouldn't unregister auto-listen interfaces.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-07 12:03:03 +02:00
Sebastian Lackner ce2080ac60 rpcrt4: Hold CS while iterating through protseqs list.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-12 20:02:03 +02:00
Jacek Caban 09e98be243 rpcrt4: Wait for server threads to finish in RpcMgmtWaitServerListen.
This fixes races when stopping manual listen RPC servers. It should fix
races in Office applications as well as our services.exe (visible as CS
error on prefix shutdown).

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-31 21:33:40 +02:00
Jacek Caban e98c7a59c2 rpcrt4: Wait for all active connections to be released before quiting server thread.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-31 21:33:39 +02:00
Jacek Caban 5c81f8295e rpcrt4: Store server thread handle in RpcServerProtseq.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-31 21:33:38 +02:00
Jacek Caban 6b53b79e18 rpcrt4: Use HEAP_ZERO_MEMORY to alloc RpcServerProtseq objects.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-24 13:57:52 +02:00
Jacek Caban 42ba4d731a rpcrt4: Introduce op for closing connection read end and use it when shutting down server.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-24 13:57:37 +02:00
Jacek Caban ef267f115f rpcrt4: Store all active connections in RpcServerProtseq.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-23 19:25:43 +02:00
Jacek Caban 13d529a749 rpcrt4: Renamed connections list to listeners.
To preserve the name for actual connections.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-23 19:25:19 +02:00
Jacek Caban 2035294d0c rpcrt4: Use standard Wine list to store connections in RpcServerProtseq.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-16 18:58:56 +02:00
Jacek Caban d0ed6d1035 rpcrt4: Get rid of manual_listen_count and use binary state instead.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-16 15:03:54 +01:00
Jacek Caban c32cd1119c rpcrt4: Acquire new credential handle for each connection.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-30 13:23:21 +01:00
Jacek Caban da05dfd151 rpcrt4: Store security package name in rpc_server_registered_auth_info.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-30 13:23:19 +01:00
Jacek Caban ad77b4c5fd rpcrt4: Initialize all rpc_server_registered_auth_info fields in RpcServerRegisterAuthInfoW.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-08 19:01:58 +01:00
Jacek Caban f3e5e76da9 rpcrt4: Moved AcquireCredentialHandle call to RPCRT4_ServerGetRegisteredAuthInfo.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-03 10:54:17 +09:00
Jacek Caban 6cdbde64ea rpcrt4: Moved EnumerateSecurityPackagesW call to helper function.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-03 10:54:17 +09:00
Jacek Caban a7b1e61fa6 rpcrt4: Forward RpcServerRegisterAuthInfoA to RpcServerRegisterAuthInfoW.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-03 10:54:17 +09:00
Jacek Caban 6141cc800c rpcrt4: Added RpcServerRegisterIf3 implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-18 15:16:12 +09:00
Jacek Caban 41f93d8f59 rpcrt4: Added support for binding argument in RpcMgmtIsServerListening.
Based on patch by Andrew Eikum.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-28 12:45:01 +09:00
Nikolay Sivov 73a68b065b rpcrt4: Fix RpcMgmtStopServerListening() return value when we're not listening. 2015-03-26 14:21:49 +09:00
Hans Leidekker a5750a1fdf rpcrt4: Implement RpcMgmtIsServerListening. 2012-11-12 13:17:00 +01:00
Hans Leidekker 4d6ff85433 rpcrt4: Add a stub implementation of RpcServerInqDefaultPrincNameA/W. 2012-05-09 17:49:29 +02:00
Alexandre Julliard d2ca9f4b02 rpcrt4: Add ref counting to RPC connections, and grab a reference while processing an RPC packet. 2012-02-14 17:59:27 +01:00
Francois Gouget 92ff5f3548 rpcrt4: Delete the static critical sections when unloading the dll. 2011-11-17 11:38:22 +01:00
Francois Gouget 86d8217aea rpcrt4: Give a name to the critical sections. 2011-11-14 20:15:26 +01:00
Frédéric Delanoy 7e309601f3 dlls: Assorted spelling fixes. 2011-08-03 14:15:50 +02:00
Damjan Jovanovic ec2f513690 rpcrt4: Implement RpcNetworkInqProtseqs. 2011-06-28 16:45:56 -05:00
Damjan Jovanovic 57b7044cd6 rpcrt4: Add stubs for RpcNetworkInqProtseqs. 2011-06-17 19:30:46 +02:00
Hans Leidekker 215b69e36b rpcrt4: Add a stub implementation of RpcMgmtSetAuthorizationFn. 2010-12-15 12:02:09 +01:00
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