Commit Graph

467 Commits

Author SHA1 Message Date
Robert Shearman 0fad0895d7 rpcrt4: Don't try to resolve the name when constructing a protocol tower.
Instead just fill it in with all zeros.
2006-06-03 11:42:54 +02:00
Robert Shearman ebcd6b6a24 rpcrt4: Change ComputeConformance and ComputeVariance from macros to
inline functions. Clear pStubMsg->Offset in ComputeVariance since it
isn't set by ComputeConformanceOrVariance and so could be left filled
with garbage.
2006-06-03 11:42:36 +02:00
Robert Shearman a48433453b rpcrt4: The lifetime of the binding handle stored in the context
handle is independent of the binding handle used in the call that
unmarshaled it, so we should use RpcBindingCopy to make a copy of it
and then call RpcBindingFree later to free it.
2006-06-03 11:42:25 +02:00
Robert Shearman a4fff73ba3 rpcrt4: Fix an incorrect format string pointer being passed in to
ComputeVariance in NdrConformantVaryingStructBufferSize.
2006-06-03 11:42:13 +02:00
Robert Shearman 6a11aba526 rpcrt4: Skip over the right-hand-side data for the protocol floor so
that we can parse the towers received from native rpcrt4.
2006-06-03 11:42:03 +02:00
Robert Shearman da44126395 rpcrt4: Align the buffer correctly when marshaling and unmarshaling context handles. 2006-06-03 11:41:51 +02:00
Robert Shearman ec5b3c3ea6 rpcrt4: Freeing a NULL context handle is allowed. 2006-06-03 11:41:42 +02:00
Robert Shearman 1a346a4a13 rpcrt4: NdrClientContextMarshall/Unmarshall should both increment the buffer pointer. 2006-06-03 11:41:33 +02:00
Robert Shearman dc6c640cd2 rpcrt4: Fix the unmarshaling of pointers in conformant varying arrays,
by passing the correct type format string to ReadConformance.
2006-06-03 11:41:22 +02:00
Robert Shearman 972ce2f635 rpcrt4: CContext can be NULL in NDRCContextMarshall, in which case we should marshall all-zeros. 2006-06-03 11:41:07 +02:00
Robert Shearman 678ad6286c rpcrt4: Fix the pointer count used when handling embedded pointers in varying arrays. 2006-06-03 11:40:45 +02:00
Robert Shearman 423e7e3089 rpcrt4: Print some more informative error messages when getaddrinfo fails. 2006-06-03 11:40:42 +02:00
Robert Shearman efc974d1f5 rpcrt4: All of the parameters to TowerExplode are optional. 2006-06-02 11:24:29 +02:00
Robert Shearman e15e60b9f9 rpcrt4: Implement TowerConstruct and TowerExplode.
Add some tests for these undocumented functions.
2006-06-02 11:24:20 +02:00
Robert Shearman 37364b836f rpcrt4: Add functions for generating and parsing the upper floors in endpoint-mapper towers for different transports. 2006-06-02 11:24:03 +02:00
Robert Shearman 84ab2e78a4 rpcrt4: Implement I_RpcAllocate and I_RpcFree. 2006-06-02 11:22:56 +02:00
Robert Shearman cc9baf364e rpcrt4: Don't send the unused part of the allocated buffer. 2006-06-02 11:22:44 +02:00
Robert Shearman 11da87d098 rpcrt4: NdrClientInitializeNew shouldn't clear all of the stub message, only selected fields. 2006-06-02 11:22:38 +02:00
Mike McCormack 7f98594f75 rpcrt4: Implement NDRCContext(Un)marshall and NDRCContextBinding. 2006-06-01 11:48:33 +02:00
Huw Davies bb835ae438 rpcrt4: Add ENUM32 support to ComplexStructMemorySize. 2006-05-31 15:48:11 +02:00
Robert Shearman 115525f3c4 rpcrt4: Make UserMarshalFlags static. 2006-05-30 12:25:22 +02:00
Robert Shearman df57b025c6 rpcrt4: We should never pass an fMustAlloc value of TRUE into the
unmarshaler routines of embedded complexes in complex struct and array
unmarshaling.

Fixes a regression caused by commit
19fad8e710, reported by Ulrich
Dobramysl.
2006-05-30 12:25:17 +02:00
Robert Shearman cafd2ab37e rpcrt4: Make sure to set a unique pointer with an id of 0 to NULL when unmarshaling. 2006-05-30 12:25:03 +02:00
Robert Shearman 11eb8ee042 rpcrt4: If the number of pointers is 0 for NdrFullPointerXlatInit then
set the number of pointers to a large default, so that NumberOfBuckets
doesn't end up less than zero.
2006-05-30 12:24:53 +02:00
Robert Shearman ff9fd9c430 rpcrt4: Handle marshaling/unmarshaling full pointers. 2006-05-30 12:24:41 +02:00
Robert Shearman bf985900e2 rpcrt4: For full pointers the state consists of flags, so or new flags into the field instead of assigning.
The return value of all full pointer functions that return an int 
depends on the passed in query type being a flag in the state.
2006-05-30 12:24:22 +02:00
Robert Shearman 63307241dd rpcrt4: Store the QueryType in the state table in NdrFullPointerQueryRefId.
Implement NdrFullPointerFree.
2006-05-27 10:54:39 +02:00
Robert Shearman 7af506b2b4 rpcrt4: Fix NdrFullPointerQueryRefId to make more tests pass. 2006-05-27 10:54:21 +02:00
Robert Shearman 767631d853 rpcrt4: Implement remaining part of NdrFullPointerQueryPointer and implement NdrFullPointerInsertRefId. 2006-05-27 10:53:48 +02:00
Robert Shearman eb0fe9e6e3 rpcrt4: Implement some full pointer functions and add stubs for others.
Add some tests.
2006-05-27 10:53:29 +02:00
Mike McCormack a534fdec32 rpcrt4: Implement NdrClientContext(Un)Marshall. 2006-05-26 20:21:00 +02:00
Robert Shearman 013d00f094 rpcrt4: Even though FC_DEREFERENCE conformance is handled elsewhere in
ComputeConformanceOrVariance it is still necessary to set the count
variable to the value retrieved.
2006-05-26 20:15:49 +02:00
Robert Shearman 8b56e88276 rpcrt4: Return the actual status code sent back by the server, rather than RPC_S_CALL_FAILED. 2006-05-26 20:15:44 +02:00
Mike McCormack 42bf8254c0 rpcrt4: Stub implementations for NDRS marshalling functions. 2006-05-25 10:45:01 +02:00
Robert Shearman ec2a9cef3a rpcrt4: Set the Memory field of the stub message structure to the
start of the memory that an embedded pointer is embedded in so that
FC_POINTER conformance works correctly.
2006-05-25 10:40:35 +02:00
Robert Shearman 4e85273086 rpcrt4: Implement explicit generic binding handles. 2006-05-25 10:40:23 +02:00
Robert Shearman 0030b6dacd rpcrt4: Move the getting of the client binding handle to a separate function. 2006-05-25 10:40:09 +02:00
Robert Shearman fdda17deea rpcrt4: Move the initialising of the stub message structure nearer to the top of NdrClientCall2.
Set stubMsg.StackTop after calling the initialise function.
2006-05-25 10:39:50 +02:00
Robert Shearman 9d87447455 rpcrt4: Store the arguments exclusively in stubMsg.StackTop. 2006-05-25 10:39:22 +02:00
Robert Shearman b9f36c3fa2 rpcrt4: Implement RpcBindingCopy. 2006-05-25 10:39:02 +02:00
Alexandre Julliard 9ca8a86914 Link against libwine_unicode everywhere we use Unicode functions. 2006-05-24 18:05:40 +02:00
Alexandre Julliard 23f9e358ad Tests should not use wine/unicode.h. 2006-05-24 18:05:09 +02:00
Mike McCormack 4def9cc022 rpcrt4: Add stub implementations for NDRCContext(Un)Marshall. 2006-05-24 14:38:14 +02:00
Huw Davies 00598e49cf rpcrt4: Uncomment test now that it works correctly. 2006-05-23 17:51:50 +02:00
Huw Davies 69d18c48b1 rpcrt4: Add another static. 2006-05-23 17:51:44 +02:00
Huw Davies 9ba57efc18 rpcrt4: Fix some comments and move the NdrSimpleType* functions out from amongst the NdrSimpleStruct* ones. 2006-05-23 17:51:19 +02:00
Jonathan Ernst 360a3f9142 Update the address of the Free Software Foundation. 2006-05-23 14:11:13 +02:00
Robert Shearman dd362a62a1 rpcrt4: Fix copying too much data from the buffer by not taking into account the fact that auth_pad_len has been included in the fragment length. 2006-05-23 11:36:37 +02:00
Robert Shearman e91da1458d rpcrt4: Authentication padding should only be generated if there is authentication data. 2006-05-23 11:36:26 +02:00
Robert Shearman 6e7d06ad34 rpcrt4: Handle pointers to context handles in the stubless code.
Implement check for NULL context handles if requested.
2006-05-20 17:37:36 +02:00
Robert Shearman 9c885c9185 rpcrt4: We don't need to free object pointers if we are told we must allocate. 2006-05-20 17:37:25 +02:00
Robert Shearman a2767e8d71 rpcrt4: Use macros to generate the code for unmarshaling base types. 2006-05-20 17:37:13 +02:00
Robert Shearman 19fad8e710 rpcrt4: Don't set the memory pointer to NULL before calling PointerUnmarshall.
Call it with fMustAlloc set to TRUE instead to achieve the same result
without side-effects.
2006-05-20 17:36:42 +02:00
Robert Shearman 87ecf526b3 rpcrt4: Make more internal functions static. 2006-05-20 17:36:15 +02:00
Robert Shearman 0592210bcd rpcrt4: Add the definition of RpcAuthVerifier to rpc_defs.h from the DCE/RPC spec.
Use it in RPCRT4_SendAuth instead of writing out the data byte-by-byte.
2006-05-20 17:31:16 +02:00
Huw Davies f151ecb0d1 rpcrt4: Use IsClient to determine whether we can use the Buffer memory or not.
Add simple struct tests.
2006-05-20 14:03:56 +02:00
Robert Shearman cfa769fb9f rpcrt4: Warn if CreateNamedPipe fails. 2006-05-20 14:03:31 +02:00
Robert Shearman 5f266c54a1 rpcrt4: Add the correct amount of auth padding to messages. 2006-05-20 14:02:51 +02:00
Robert Shearman 4fb6295528 rpcrt4: Wait for all of the requested bytes to be returned for tcp connections. 2006-05-20 14:02:30 +02:00
Robert Shearman a2d2d4db63 rpcrt4: Update the todo lists and copyrights. 2006-05-20 14:02:24 +02:00
Robert Shearman 9cebbdd80f rpcrt4: Fix for the open functions in the transports being transposed between ncacn_np and ncalrpc. 2006-05-20 14:00:48 +02:00
Robert Shearman c1a31cef3d rpcrt4: Don't release the auth info if it isn't present. 2006-05-20 14:00:43 +02:00
Mike McCormack a45b16a460 rpcrt4: Fix a possible memory leak, cleanup a bit. 2006-05-18 16:36:44 +02:00
Mike McCormack c3a08421a2 rpcrt4: Fix and test RpcNetworkIsProtseqValid. 2006-05-18 16:36:34 +02:00
Mike McCormack 0f8f927aed rpcrt4: Add a stub implementation for RpcMgmtIsServerListening. 2006-05-18 16:36:21 +02:00
Robert Shearman 63b66b95f9 rpcrt4: Implement RpcBindingSetAuthInfoExW based on the implementation for RpcBindingSetAuthInfoExA. 2006-05-18 10:37:13 +02:00
Robert Shearman 4cd5be2637 rpcrt4: A NULL AuthInfo is allowed.
Pass the server principal name into AcquireCredentialsHandleA.
2006-05-18 10:36:55 +02:00
Robert Shearman 84e42e0165 rpcrt4: Support all available security packages in RpcBindingSetAuthInfoExA, instead of just NTLM. 2006-05-18 10:36:42 +02:00
Robert Shearman 4e89efadf6 rpcrt4: Only use the cached connection if the authentication information is compatible. 2006-05-18 10:36:32 +02:00
Robert Shearman 217ec275b8 rpcrt4: Store non-connection-specific authentication information in a ref-counted structure that is shared between connections and bindings. 2006-05-18 10:36:07 +02:00
Robert Shearman 9b3cecaeb5 rpcrt4: Fix an off-by-one error when checking the size of the buffer in NdrInterfacePointerMarshall. 2006-05-18 10:35:56 +02:00
Robert Shearman 855535af62 rpcrt4: Handle interface pointers in EmbeddedComplexSize. 2006-05-18 10:35:16 +02:00
Robert Shearman 40d80d7c7a rpcrt4: Make secur32 into a delayed import, as most of the time it won't be needed. 2006-05-18 10:35:12 +02:00
Robert Shearman 5067ea70c0 rpcrt4: Increment the call id field of the request header.
This is necessary for compatibility with MS/RPC servers.
2006-05-18 10:34:33 +02:00
Robert Shearman c1d00c547b rpcrt4: Implement NdrNonEncapsulatedUnionMemorySize. 2006-05-18 10:34:21 +02:00
Robert Shearman 62bbaf70b3 rpcrt4: Fix the wire protocol of the user marshal functions to match MS/RPC. 2006-05-18 10:34:09 +02:00
Robert Shearman 2aa52b07d6 rpcrt4: If the authorisation failed during a send then we should return ERROR_ACCESS_DENIED. 2006-05-18 10:33:50 +02:00
Robert Shearman 4fae04b2f5 rpcrt4: Fix NdrConformantArrayMemorySize. 2006-05-18 10:33:39 +02:00
Robert Shearman c4fbad1d11 rpcrt4: Implement NdrUserMarshalMemorySize. 2006-05-18 10:33:00 +02:00
Huw Davies effac656bb rpcrt4: Don't update StubMsg->MemorySize while unmarshaling.
Add a bunch of marshaling tests (based on a program by Rob Shearman).
2006-05-17 21:46:43 +02:00
Robert Shearman a8c51a4cd9 rpcrt4: Implement NdrInterfacePointerMemorySize. 2006-05-17 21:01:13 +02:00
Robert Shearman 45ee17899a rpcrt4: Make some functions that aren't used outside of the file static. 2006-05-17 21:01:02 +02:00
Robert Shearman b52ae402ad rpcrt4: Fill out more of the function tables with functions that already exist. 2006-05-17 21:00:42 +02:00
Robert Shearman ecd3780cc0 rpcrt4: Raise an exception if there is no default handler for a union. 2006-05-17 21:00:35 +02:00
Robert Shearman 0f7e4a877a rpcrt4: Implement fixed array functions. 2006-05-16 12:51:30 +02:00
Robert Shearman c27db4cde6 rpcrt4: Remove the BUFFER_PARANOIA overestimates for string memory sizes. 2006-05-16 12:51:19 +02:00
Robert Shearman 4c0b0e0069 rpcrt4: Implement computing of conformance from a correlation descriptor for conformant strings. 2006-05-16 12:51:09 +02:00
Robert Shearman 124acc9b67 rpcrt4: Fix conformant varying structs to comply to the DCE/RPC spec. 2006-05-16 12:50:54 +02:00
Robert Shearman e6120f2029 rpcrt4: Don't duplicate the conformance calculating code, just use the
common ComputeConformance function to store the result in
pStubMsg->MaxCount (as this is what callback function store the
conformance value into anyway).
2006-05-16 12:50:42 +02:00
Robert Shearman ecdd09b1b2 rpcrt4: Implement conformant varying struct functions. 2006-05-16 12:50:27 +02:00
Robert Shearman 63aaf8dbd7 rpcrt4: Implement more conformance operations and more types. 2006-05-16 12:50:19 +02:00
Mike McCormack 336e67e2d1 rpcrt4: Implemented NTLM authentication for rpcrt4 connections. 2006-05-16 12:40:13 +02:00
Mike McCormack f20cfdfa84 rpcrt4: Use RPCRT4_Receive rather than accessing the transport directly. 2006-05-16 12:36:37 +02:00
Robert Shearman b96d630022 rpcrt4: Implement NdrSimpleStructMemorySize. 2006-05-15 16:08:45 +02:00
Robert Shearman 2aff761dfd rpcrt4: Fix the conformant struct functions to not call conformant array functions.
The conformance has to be the first thing in the buffer, in accordance 
with the DCE/RPC spec and to be compatible with the pointer layout 
format strings that MIDL generates.
2006-05-15 16:08:36 +02:00
Robert Shearman 4af0a6b805 rpcrt4: In NdrConformantBufferSize, SizeConformance should be called, not SizeVariance. 2006-05-15 16:08:28 +02:00
Robert Shearman 2479aec4af rpcrt4: Save pStubMsg->ActualCount in a local variable in the complex
array functions, before calling a function that could change it and
cause the wrong number of loop iterations.
2006-05-15 16:08:19 +02:00
Robert Shearman 345c92643e rpcrt4: Dereference the memory for pointers in NdrNonEncapsulatedUnionUnmarshall.
Pointers in a non-encapsulated union behave like embedded pointers, so 
don't rely on the NdrPointer* functions doing the right thing in this 
case and call the Pointer* functions directly.
2006-05-15 16:08:04 +02:00
Robert Shearman f0aea2d5ee rpcrt4: Rename ComplexStructSize to ComplexStructMemorySize to reflect the fact that it increments the buffer.
Replace the code in EmbeddedComplexSize that sizes non-encapsulated 
unions without using a memory sizer routine, since this function 
shouldn't touch the buffer.

Add a new function EmbeddedComplexMemorySize and use it in some memory 
sizer routines where EmbeddedComplexSize was previously used.
2006-05-15 16:07:54 +02:00
Robert Shearman 788ce20dea rpcrt4: Fix embedded pointers in arrays by taking into account the iteration when calculating the appropriate memory and buffer pointers. 2006-05-15 16:07:42 +02:00