Rob Shearman : rpcrt4: Override inquire_auth_client for ncalrpc transport to always indicate that the connection is authenticated .
Alexandre Julliard
julliard at winehq.org
Mon Dec 14 09:51:19 CST 2009
Module: wine
Branch: master
Commit: f823f2181e4387057222bd6431ddf0e62352dd0d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f823f2181e4387057222bd6431ddf0e62352dd0d
Author: Rob Shearman <robertshearman at gmail.com>
Date: Sun Dec 13 21:36:09 2009 +0000
rpcrt4: Override inquire_auth_client for ncalrpc transport to always indicate that the connection is authenticated.
---
dlls/rpcrt4/rpc_binding.c | 2 +-
dlls/rpcrt4/rpc_transport.c | 32 +++++++++++++++++++++++++++++++-
2 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/dlls/rpcrt4/rpc_binding.c b/dlls/rpcrt4/rpc_binding.c
index 8bfc493..a534b7d 100644
--- a/dlls/rpcrt4/rpc_binding.c
+++ b/dlls/rpcrt4/rpc_binding.c
@@ -1594,8 +1594,8 @@ RpcBindingInqAuthClientExA( RPC_BINDING_HANDLE ClientBinding, RPC_AUTHZ_HANDLE *
if (status == RPC_S_OK && ServerPrincName)
{
*ServerPrincName = (RPC_CSTR)RPCRT4_strdupWtoA(principal);
+ if (!*ServerPrincName && principal) status = ERROR_OUTOFMEMORY;
RpcStringFreeW(&principal);
- if (!*ServerPrincName) return ERROR_OUTOFMEMORY;
}
return status;
diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c
index 00ada8e..07a1e04 100644
--- a/dlls/rpcrt4/rpc_transport.c
+++ b/dlls/rpcrt4/rpc_transport.c
@@ -840,6 +840,36 @@ static RPC_STATUS rpcrt4_ncalrpc_secure_packet(RpcConnection *conn,
return RPC_S_OK;
}
+static RPC_STATUS rpcrt4_ncalrpc_inquire_auth_client(
+ RpcConnection *conn, RPC_AUTHZ_HANDLE *privs, RPC_WSTR *server_princ_name,
+ ULONG *authn_level, ULONG *authn_svc, ULONG *authz_svc, ULONG flags)
+{
+ TRACE("(%p, %p, %p, %p, %p, %p, 0x%x)\n", conn, privs,
+ server_princ_name, authn_level, authn_svc, authz_svc, flags);
+
+ if (privs)
+ {
+ FIXME("privs not implemented\n");
+ *privs = NULL;
+ }
+ if (server_princ_name)
+ {
+ FIXME("server_princ_name not implemented\n");
+ *server_princ_name = NULL;
+ }
+ if (authn_level) *authn_level = RPC_C_AUTHN_LEVEL_PKT_PRIVACY;
+ if (authn_svc) *authn_svc = RPC_C_AUTHN_WINNT;
+ if (authz_svc)
+ {
+ FIXME("authorization service not implemented\n");
+ *authz_svc = RPC_C_AUTHZ_NONE;
+ }
+ if (flags)
+ FIXME("flags 0x%x not implemented\n", flags);
+
+ return RPC_S_OK;
+}
+
/**** ncacn_ip_tcp support ****/
static size_t rpcrt4_ip_tcp_get_top_of_tower(unsigned char *tower_data,
@@ -2773,7 +2803,7 @@ static const struct connection_ops conn_protseq_list[] = {
rpcrt4_ncalrpc_secure_packet,
rpcrt4_conn_np_impersonate_client,
rpcrt4_conn_np_revert_to_self,
- RPCRT4_default_inquire_auth_client,
+ rpcrt4_ncalrpc_inquire_auth_client,
},
{ "ncacn_ip_tcp",
{ EPM_PROTOCOL_NCACN, EPM_PROTOCOL_TCP },
More information about the wine-cvs
mailing list