Module: wine Branch: master Commit: a1a5d8d02a94360f8ab183fb70232783ed051a9e URL: http://source.winehq.org/git/wine.git/?a=commit;h=a1a5d8d02a94360f8ab183fb70...
Author: Rob Shearman robertshearman@gmail.com Date: Mon Jun 9 22:36:43 2008 +0100
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.
---
dlls/rpcrt4/tests/server.c | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/dlls/rpcrt4/tests/server.c b/dlls/rpcrt4/tests/server.c index 5cc9d42..5f6da37 100644 --- a/dlls/rpcrt4/tests/server.c +++ b/dlls/rpcrt4/tests/server.c @@ -1240,13 +1240,24 @@ server(void) static unsigned char np[] = "ncacn_np"; static unsigned char pipe[] = PIPE; RPC_STATUS status, iptcp_status, np_status; + RPC_STATUS (RPC_ENTRY *pRpcServerRegisterIfEx)(RPC_IF_HANDLE,UUID*, + RPC_MGR_EPV*, unsigned int,unsigned int,RPC_IF_CALLBACK_FN*);
iptcp_status = RpcServerUseProtseqEp(iptcp, 20, port, NULL); ok(iptcp_status == RPC_S_OK, "RpcServerUseProtseqEp(ncacn_ip_tcp) failed with status %ld\n", iptcp_status); np_status = RpcServerUseProtseqEp(np, 0, pipe, NULL); ok(np_status == RPC_S_OK, "RpcServerUseProtseqEp(ncacn_np) failed with status %ld\n", np_status);
- status = RpcServerRegisterIf(s_IServer_v0_0_s_ifspec, NULL, NULL); + pRpcServerRegisterIfEx = (void *)GetProcAddress(GetModuleHandle("rpcrt4.dll"), "RpcServerRegisterIfEx"); + if (pRpcServerRegisterIfEx) + { + trace("Using RpcServerRegisterIfEx\n"); + status = pRpcServerRegisterIfEx(s_IServer_v0_0_s_ifspec, NULL, NULL, + RPC_IF_ALLOW_CALLBACKS_WITH_NO_AUTH, + RPC_C_LISTEN_MAX_CALLS_DEFAULT, NULL); + } + else + status = RpcServerRegisterIf(s_IServer_v0_0_s_ifspec, NULL, NULL); ok(status == RPC_S_OK, "RpcServerRegisterIf failed with status %ld\n", status); status = RpcServerListen(1, 20, TRUE); ok(status == RPC_S_OK, "RpcServerListen failed with status %ld\n", status);