rpcrt4: Override inquire_auth_client for ncalrpc transport to always indicate that the connection is authenticated.

This commit is contained in:
Rob Shearman 2009-12-13 21:36:09 +00:00 committed by Alexandre Julliard
parent 3dbf356f8f
commit f823f2181e
2 changed files with 32 additions and 2 deletions

View File

@ -1594,8 +1594,8 @@ RpcBindingInqAuthClientExA( RPC_BINDING_HANDLE ClientBinding, RPC_AUTHZ_HANDLE *
if (status == RPC_S_OK && ServerPrincName) if (status == RPC_S_OK && ServerPrincName)
{ {
*ServerPrincName = (RPC_CSTR)RPCRT4_strdupWtoA(principal); *ServerPrincName = (RPC_CSTR)RPCRT4_strdupWtoA(principal);
if (!*ServerPrincName && principal) status = ERROR_OUTOFMEMORY;
RpcStringFreeW(&principal); RpcStringFreeW(&principal);
if (!*ServerPrincName) return ERROR_OUTOFMEMORY;
} }
return status; return status;

View File

@ -840,6 +840,36 @@ static RPC_STATUS rpcrt4_ncalrpc_secure_packet(RpcConnection *conn,
return RPC_S_OK; 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 ****/ /**** ncacn_ip_tcp support ****/
static size_t rpcrt4_ip_tcp_get_top_of_tower(unsigned char *tower_data, 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_ncalrpc_secure_packet,
rpcrt4_conn_np_impersonate_client, rpcrt4_conn_np_impersonate_client,
rpcrt4_conn_np_revert_to_self, rpcrt4_conn_np_revert_to_self,
RPCRT4_default_inquire_auth_client, rpcrt4_ncalrpc_inquire_auth_client,
}, },
{ "ncacn_ip_tcp", { "ncacn_ip_tcp",
{ EPM_PROTOCOL_NCACN, EPM_PROTOCOL_TCP }, { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_TCP },