Commit 59e3d9b5 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

rpcrt4: Implement RpcBindingInqAuthClient{, Ex}.

parent bdfaa846
...@@ -1493,6 +1493,90 @@ RpcBindingInqAuthInfoW( RPC_BINDING_HANDLE Binding, RPC_WSTR *ServerPrincName, U ...@@ -1493,6 +1493,90 @@ RpcBindingInqAuthInfoW( RPC_BINDING_HANDLE Binding, RPC_WSTR *ServerPrincName, U
} }
/*********************************************************************** /***********************************************************************
* RpcBindingInqAuthClientA (RPCRT4.@)
*/
RPCRTAPI RPC_STATUS RPC_ENTRY
RpcBindingInqAuthClientA( RPC_BINDING_HANDLE ClientBinding, RPC_AUTHZ_HANDLE *Privs,
RPC_CSTR *ServerPrincName, ULONG *AuthnLevel, ULONG *AuthnSvc,
ULONG *AuthzSvc )
{
return RpcBindingInqAuthClientExA(ClientBinding, Privs, ServerPrincName, AuthnLevel,
AuthnSvc, AuthzSvc, 0);
}
/***********************************************************************
* RpcBindingInqAuthClientW (RPCRT4.@)
*/
RPCRTAPI RPC_STATUS RPC_ENTRY
RpcBindingInqAuthClientW( RPC_BINDING_HANDLE ClientBinding, RPC_AUTHZ_HANDLE *Privs,
RPC_WSTR *ServerPrincName, ULONG *AuthnLevel, ULONG *AuthnSvc,
ULONG *AuthzSvc )
{
return RpcBindingInqAuthClientExW(ClientBinding, Privs, ServerPrincName, AuthnLevel,
AuthnSvc, AuthzSvc, 0);
}
/***********************************************************************
* RpcBindingInqAuthClientExA (RPCRT4.@)
*/
RPCRTAPI RPC_STATUS RPC_ENTRY
RpcBindingInqAuthClientExA( RPC_BINDING_HANDLE ClientBinding, RPC_AUTHZ_HANDLE *Privs,
RPC_CSTR *ServerPrincName, ULONG *AuthnLevel, ULONG *AuthnSvc,
ULONG *AuthzSvc, ULONG Flags )
{
RPC_STATUS status;
RPC_WSTR principal;
TRACE("%p %p %p %p %p %p 0x%x\n", ClientBinding, Privs, ServerPrincName, AuthnLevel,
AuthnSvc, AuthzSvc, Flags);
status = RpcBindingInqAuthClientExW(ClientBinding, Privs, ServerPrincName ? &principal : NULL,
AuthnLevel, AuthnSvc, AuthzSvc, Flags);
if (status == RPC_S_OK && ServerPrincName)
{
*ServerPrincName = (RPC_CSTR)RPCRT4_strdupWtoA(principal);
RpcStringFreeW(&principal);
if (!*ServerPrincName) return ERROR_OUTOFMEMORY;
}
return status;
}
/***********************************************************************
* RpcBindingInqAuthClientExW (RPCRT4.@)
*/
RPCRTAPI RPC_STATUS RPC_ENTRY
RpcBindingInqAuthClientExW( RPC_BINDING_HANDLE ClientBinding, RPC_AUTHZ_HANDLE *Privs,
RPC_WSTR *ServerPrincName, ULONG *AuthnLevel, ULONG *AuthnSvc,
ULONG *AuthzSvc, ULONG Flags )
{
RpcBinding *bind = ClientBinding;
TRACE("%p %p %p %p %p %p 0x%x\n", ClientBinding, Privs, ServerPrincName, AuthnLevel,
AuthnSvc, AuthzSvc, Flags);
if (!bind->AuthInfo) return RPC_S_BINDING_HAS_NO_AUTH;
if (Privs) *Privs = (RPC_AUTHZ_HANDLE)bind->AuthInfo->identity;
if (ServerPrincName)
{
*ServerPrincName = RPCRT4_strdupW(bind->AuthInfo->server_principal_name);
if (!*ServerPrincName) return ERROR_OUTOFMEMORY;
}
if (AuthnLevel) *AuthnLevel = bind->AuthInfo->AuthnLevel;
if (AuthnSvc) *AuthnSvc = bind->AuthInfo->AuthnSvc;
if (AuthzSvc)
{
FIXME("authorization service not implemented\n");
*AuthzSvc = RPC_C_AUTHZ_NONE;
}
if (Flags)
FIXME("flags 0x%x not implemented\n", Flags);
return RPC_S_OK;
}
/***********************************************************************
* RpcBindingSetAuthInfoExA (RPCRT4.@) * RpcBindingSetAuthInfoExA (RPCRT4.@)
*/ */
RPCRTAPI RPC_STATUS RPC_ENTRY RPCRTAPI RPC_STATUS RPC_ENTRY
......
...@@ -341,10 +341,10 @@ ...@@ -341,10 +341,10 @@
@ stdcall RpcBindingFree(ptr) @ stdcall RpcBindingFree(ptr)
@ stdcall RpcBindingFromStringBindingA(str ptr) @ stdcall RpcBindingFromStringBindingA(str ptr)
@ stdcall RpcBindingFromStringBindingW(wstr ptr) @ stdcall RpcBindingFromStringBindingW(wstr ptr)
@ stub RpcBindingInqAuthClientA @ stdcall RpcBindingInqAuthClientA(ptr ptr ptr ptr ptr ptr)
@ stub RpcBindingInqAuthClientExA @ stdcall RpcBindingInqAuthClientExA(ptr ptr ptr ptr ptr ptr long)
@ stub RpcBindingInqAuthClientExW @ stdcall RpcBindingInqAuthClientExW(ptr ptr ptr ptr ptr ptr long)
@ stub RpcBindingInqAuthClientW @ stdcall RpcBindingInqAuthClientW(ptr ptr ptr ptr ptr ptr)
@ stdcall RpcBindingInqAuthInfoA(ptr ptr ptr ptr ptr ptr) @ stdcall RpcBindingInqAuthInfoA(ptr ptr ptr ptr ptr ptr)
@ stdcall RpcBindingInqAuthInfoExA(ptr ptr ptr ptr ptr ptr long ptr) @ stdcall RpcBindingInqAuthInfoExA(ptr ptr ptr ptr ptr ptr long ptr)
@ stdcall RpcBindingInqAuthInfoExW(ptr ptr ptr ptr ptr ptr long ptr) @ stdcall RpcBindingInqAuthInfoExW(ptr ptr ptr ptr ptr ptr long ptr)
......
...@@ -509,6 +509,28 @@ RPCRTAPI RPC_STATUS RPC_ENTRY ...@@ -509,6 +509,28 @@ RPCRTAPI RPC_STATUS RPC_ENTRY
ULONG *AuthnSvc, RPC_AUTH_IDENTITY_HANDLE *AuthIdentity, ULONG *AuthzSvc ); ULONG *AuthnSvc, RPC_AUTH_IDENTITY_HANDLE *AuthIdentity, ULONG *AuthzSvc );
#define RpcBindingInqAuthInfo WINELIB_NAME_AW(RpcBindingInqAuthInfo) #define RpcBindingInqAuthInfo WINELIB_NAME_AW(RpcBindingInqAuthInfo)
RPCRTAPI RPC_STATUS RPC_ENTRY
RpcBindingInqAuthClientA( RPC_BINDING_HANDLE ClientBinding, RPC_AUTHZ_HANDLE *Privs,
RPC_CSTR *ServerPrincName, ULONG *AuthnLevel, ULONG *AuthnSvc,
ULONG *AuthzSvc );
RPCRTAPI RPC_STATUS RPC_ENTRY
RpcBindingInqAuthClientW( RPC_BINDING_HANDLE ClientBinding, RPC_AUTHZ_HANDLE *Privs,
RPC_WSTR *ServerPrincName, ULONG *AuthnLevel, ULONG *AuthnSvc,
ULONG *AuthzSvc );
#define RpcBindingInqAuthClient WINELIB_NAME_AW(RpcBindingInqAuthClient)
RPCRTAPI RPC_STATUS RPC_ENTRY
RpcBindingInqAuthClientExA( RPC_BINDING_HANDLE ClientBinding, RPC_AUTHZ_HANDLE *Privs,
RPC_CSTR *ServerPrincName, ULONG *AuthnLevel, ULONG *AuthnSvc,
ULONG *AuthzSvc, ULONG Flags );
RPCRTAPI RPC_STATUS RPC_ENTRY
RpcBindingInqAuthClientExW( RPC_BINDING_HANDLE ClientBinding, RPC_AUTHZ_HANDLE *Privs,
RPC_WSTR *ServerPrincName, ULONG *AuthnLevel, ULONG *AuthnSvc,
ULONG *AuthzSvc, ULONG Flags );
#define RpcBindingInqAuthClientEx WINELIB_NAME_AW(RpcBindingInqAuthClientEx)
RPCRTAPI RPC_STATUS RPC_ENTRY RpcCancelThread(void*); RPCRTAPI RPC_STATUS RPC_ENTRY RpcCancelThread(void*);
RPCRTAPI RPC_STATUS RPC_ENTRY RpcCancelThreadEx(void*,LONG); RPCRTAPI RPC_STATUS RPC_ENTRY RpcCancelThreadEx(void*,LONG);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment