rpcrt4: Implement RpcBindingInqAuthInfo{, Ex}.

This commit is contained in:
Hans Leidekker 2009-11-12 14:45:49 +01:00 committed by Alexandre Julliard
parent 7f961c0796
commit 8abe95ddfa
1 changed files with 50 additions and 10 deletions

View File

@ -1450,9 +1450,22 @@ RpcBindingInqAuthInfoExA( RPC_BINDING_HANDLE Binding, RPC_CSTR *ServerPrincName,
ULONG *AuthnSvc, RPC_AUTH_IDENTITY_HANDLE *AuthIdentity, ULONG *AuthzSvc,
ULONG RpcQosVersion, RPC_SECURITY_QOS *SecurityQOS )
{
FIXME("%p %p %p %p %p %p %u %p\n", Binding, ServerPrincName, AuthnLevel,
RPC_STATUS status;
RPC_WSTR principal;
TRACE("%p %p %p %p %p %p %u %p\n", Binding, ServerPrincName, AuthnLevel,
AuthnSvc, AuthIdentity, AuthzSvc, RpcQosVersion, SecurityQOS);
return RPC_S_INVALID_BINDING;
status = RpcBindingInqAuthInfoExW(Binding, ServerPrincName ? &principal : NULL, AuthnLevel,
AuthnSvc, AuthIdentity, AuthzSvc, RpcQosVersion, SecurityQOS);
if (status == RPC_S_OK && ServerPrincName)
{
*ServerPrincName = (RPC_CSTR)RPCRT4_strdupWtoA(principal);
RpcStringFreeW(&principal);
if (!*ServerPrincName) return ERROR_OUTOFMEMORY;
}
return status;
}
/***********************************************************************
@ -1463,9 +1476,38 @@ RpcBindingInqAuthInfoExW( RPC_BINDING_HANDLE Binding, RPC_WSTR *ServerPrincName,
ULONG *AuthnSvc, RPC_AUTH_IDENTITY_HANDLE *AuthIdentity, ULONG *AuthzSvc,
ULONG RpcQosVersion, RPC_SECURITY_QOS *SecurityQOS )
{
FIXME("%p %p %p %p %p %p %u %p\n", Binding, ServerPrincName, AuthnLevel,
RpcBinding *bind = Binding;
TRACE("%p %p %p %p %p %p %u %p\n", Binding, ServerPrincName, AuthnLevel,
AuthnSvc, AuthIdentity, AuthzSvc, RpcQosVersion, SecurityQOS);
return RPC_S_INVALID_BINDING;
if (!bind->AuthInfo) return RPC_S_BINDING_HAS_NO_AUTH;
if (SecurityQOS)
{
FIXME("QOS not implemented\n");
return RPC_S_INVALID_BINDING;
}
if (ServerPrincName)
{
if (bind->AuthInfo->server_principal_name)
{
*ServerPrincName = RPCRT4_strdupW(bind->AuthInfo->server_principal_name);
if (!*ServerPrincName) return ERROR_OUTOFMEMORY;
}
else *ServerPrincName = NULL;
}
if (AuthnLevel) *AuthnLevel = bind->AuthInfo->AuthnLevel;
if (AuthnSvc) *AuthnSvc = bind->AuthInfo->AuthnSvc;
if (AuthIdentity) *AuthIdentity = bind->AuthInfo->identity;
if (AuthzSvc)
{
FIXME("authorization service not implemented\n");
*AuthzSvc = RPC_C_AUTHZ_NONE;
}
return RPC_S_OK;
}
/***********************************************************************
@ -1475,9 +1517,8 @@ RPCRTAPI RPC_STATUS RPC_ENTRY
RpcBindingInqAuthInfoA( RPC_BINDING_HANDLE Binding, RPC_CSTR *ServerPrincName, ULONG *AuthnLevel,
ULONG *AuthnSvc, RPC_AUTH_IDENTITY_HANDLE *AuthIdentity, ULONG *AuthzSvc )
{
FIXME("%p %p %p %p %p %p\n", Binding, ServerPrincName, AuthnLevel,
AuthnSvc, AuthIdentity, AuthzSvc);
return RPC_S_INVALID_BINDING;
return RpcBindingInqAuthInfoExA(Binding, ServerPrincName, AuthnLevel, AuthnSvc, AuthIdentity,
AuthzSvc, 0, NULL);
}
/***********************************************************************
@ -1487,9 +1528,8 @@ RPCRTAPI RPC_STATUS RPC_ENTRY
RpcBindingInqAuthInfoW( RPC_BINDING_HANDLE Binding, RPC_WSTR *ServerPrincName, ULONG *AuthnLevel,
ULONG *AuthnSvc, RPC_AUTH_IDENTITY_HANDLE *AuthIdentity, ULONG *AuthzSvc )
{
FIXME("%p %p %p %p %p %p\n", Binding, ServerPrincName, AuthnLevel,
AuthnSvc, AuthIdentity, AuthzSvc);
return RPC_S_INVALID_BINDING;
return RpcBindingInqAuthInfoExW(Binding, ServerPrincName, AuthnLevel, AuthnSvc, AuthIdentity,
AuthzSvc, 0, NULL);
}
/***********************************************************************