Commit Graph

122 Commits

Author SHA1 Message Date
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 86d8217aea rpcrt4: Give a name to the critical sections. 2011-11-14 20:15:26 +01:00
Bernhard Loos c2feafb96c rpcrt4: Switch to non-overlapped named pipe operations and use a thread for the async listen operation. 2011-09-19 17:59:35 +02:00
Bernhard Loos a57312d873 rpcrt4: The named pipe can be used for multiple operations at the same time, so use overlapped operations for ReadFile and WriteFile. 2011-09-14 17:28:38 +02:00
Bernhard Loos d599813b74 rpcrt4: Create pipes with FLAG_OVERLAPPED. 2011-07-15 16:25:18 +02:00
Damjan Jovanovic ec2f513690 rpcrt4: Implement RpcNetworkInqProtseqs. 2011-06-28 16:45:56 -05:00
Damjan Jovanovic acc112bad7 rpcrt4: Implement RpcProtseqVectorFree. 2011-06-20 19:32:02 +02:00
Rob Shearman f823f2181e rpcrt4: Override inquire_auth_client for ncalrpc transport to always indicate that the connection is authenticated. 2009-12-14 12:19:37 +01:00
Rob Shearman 3dbf356f8f rpcrt4: Allow the authentication details of the client to be transport-specific. 2009-12-14 12:19:33 +01:00
Rob Shearman d918587f1d rpcrt4: Implement client impersonation. 2009-12-14 12:19:27 +01:00
Rob Shearman 95026f9d6b rpcrt4: Override authentication functions for ncalrpc protocol to do nothing.
The protocol is local only and therefore encryption/decryption isn't
necessary to keep the data private, and methods are built into the
protocol for impersonating the user of the calling thread.
2009-12-14 12:19:21 +01:00
Rob Shearman deae193ac8 rpcrt4: Allow the connection to override the authentication mechanism for a connection type. 2009-12-14 12:19:16 +01:00
Rob Shearman ceb7fda374 rpcrt4: Fix rpcrt4_conn_tcp_read and rpcrt4_conn_tcp_write for reading/writing zero-sized data. 2009-12-14 12:18:47 +01:00
Hans Leidekker 4b33527f51 rpcrt4: Correct spelling of RPC_C_QOS_IDENTITY_STATIC and RPC_C_QOS_IDENTITY_DYNAMIC. 2009-11-04 13:07:56 +01:00
Alexandre Julliard e01420d72a rpcrt4: Assign a unique id to the connection instead of changing it for each message. 2009-08-18 20:15:01 +02:00
Alexandre Julliard aded9e4091 rpcrt4: Fix compiler warnings on 64-bit. 2009-05-28 11:56:30 +02:00
Francois Gouget 082147d906 rpcrt4: Remove WINAPI on static functions where not needed. 2009-05-06 12:20:10 +02:00
Rob Shearman 324b4d0243 rpcrt4: Add a Win32 implementation of ncacn_ip_tcp transport. 2009-04-08 16:01:42 +02:00
Rob Shearman 06c2982a39 rpcrt4: Factor out non-Win32 compatible parts of the ncacn_ip_tcp client code to allow it to be compiled in. 2009-04-08 16:01:34 +02:00
Rob Shearman ce747f3fac rpcrt4: Compile in RPC over HTTP support even if HAVE_SOCKETPAIR is not defined. 2009-04-07 14:53:34 +02: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 524a99a2da rpcrt4: Ensure that only the IP/IPv6 address families are considered in rpcrt4_protseq_ncacn_ip_tcp_open_endpoint/rpcrt4_ncacn_ip_tcp_open. 2009-03-26 16:11:07 +01:00
Rob Shearman a42d4dbfb6 rpcrt4: Allow listening on dynamically generated ncacn_ip_tcp endpoints. 2009-03-26 16:10:59 +01:00
Alexandre Julliard ce3ce9be8f rpcrt4: Disable HTTP support if we don't have socketpair and related networking functions. 2009-03-26 14:02:01 +01:00
Huw Davies eaf4492c70 rpcrt4: Dynamically allocate the buffer if the fixed size one isn't large enough. Don't return an inappropriate error if we fail to get the status text, it's only used for diagnostics. 2009-03-26 11:50:50 +01:00
Rob Shearman 5f6ae94ad0 rpcrt4: Implement RPC over HTTP support.
CodeWeavers did this work for supporting the optional HTTP connection
method of Outlook 2003/2007 (must be running with Windows versions set
to XP or higher to see this option).

This was written before Microsoft publicly released a specification
for the RPC over HTTP protocol and so was developed by examining
traffic flowing between a Windows client and an IIS server.
2009-03-25 15:20:52 +01:00
Rob Shearman cdf509d71f rpcrt4: Fix crash when calling RpcServerUseProtseq for ncacn_np and ncalrpc.
Add tests for these protocol sequences and for ncacn_ip_tcp.
2009-03-24 13:12:11 +01:00
Juan Lang 76f4b9b053 rpcrt4: Don't abort reading from a pipe if a single read is short. 2009-02-09 12:09:01 +01:00
Andrew Talbot 273b40656b rpcrt4: Declare some functions static. 2009-01-19 13:36:26 +01:00
Alexandre Julliard 8e1b59cb9a rpcrt4: Disable TCP/IP connection support if we don't have socketpair. 2008-12-22 19:55:05 +01:00
Ricardo Filipe 16920c1da7 rpcrt4: Fixed dead increments (llvm/clang). 2008-11-19 12:15:37 +01:00
Andrew Talbot 99ae980c0d rpcrt4: Sign-compare warnings fix. 2008-11-07 10:56:48 +01:00
Alexandre Julliard 83b6c8a5fa rpcrt4: Convert source files to utf-8. 2008-10-18 19:20:44 +02:00
Rob Shearman 0a5e5a6e5b rpcrt4: Print a warning if connecting to a named pipe failed in rpcrt4_conn_open_pipe in the !wait case. 2008-08-18 14:36:33 +02:00
Rob Shearman ce085ed8ec rpcrt4: Check that strings in SMB, NB and pipe floors are nul-terminated before copying the data. 2008-08-18 14:35:43 +02:00
Rob Shearman 1e46fc672a rpcrt4: Fix the protid used in ncalrpc tower functions.
The epm tower for the ncalrpc protseq should have a floor with a
protid of EPM_PROTOCOL_PIPE instead of EPM_PROTOCOL_SMB.
2008-08-18 14:35:26 +02:00
Rob Shearman 498216fc11 rpcrt4: Fix crash in rpcrt4_ncalrpc_parse_top_of_tower due to unconditionally dereferencing networkaddr and endpoint variables.
These can be NULL when parts of the tower are not required.
2008-08-18 14:35:21 +02:00
Rob Shearman 54e904e780 rpcrt4: Fix crash calculation of tower size in rpcrt4_ncalrpc_get_top_of_tower.
The size depends on the length of the endpoint string, not the network
address string.
2008-08-18 14:35:15 +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
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
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 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 0287289475 rpcrt4: Include ws2tcpip.h instead of Unix headers when targeting a build for Windows. 2008-02-25 13:27:54 +01:00
Rob Shearman 5f077bab07 rpcrt4: Implement asynchronous RPC support. 2008-01-21 12:41:51 +01:00
Rob Shearman 1a3d7c77a5 rpcrt4: Allow NULL networkaddr and endpoint in rpcrt4_np_get_top_of_tower.
Add tests for this.
2008-01-15 14:35:35 +01:00
Rob Shearman c370980dfa rpcrt4: Use send on a socket instead of write as it's more portable. 2008-01-09 12:25:46 +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
Rob Shearman 2bda19c6b0 rpcrt4: Return an error from rpcrt4_conn_tcp_read if recv returns 0. 2007-12-17 11:58:57 +01:00
Rob Shearman ba280fb1b0 rpcrt4: Fix a typo in rpcrt4_conn_tcp_read. 2007-12-14 12:27:09 +01:00