rpcrt4: Implement RpcBindingInqAuthInfo{, Ex}.
This commit is contained in:
parent
7f961c0796
commit
8abe95ddfa
|
@ -1450,9 +1450,22 @@ RpcBindingInqAuthInfoExA( RPC_BINDING_HANDLE Binding, RPC_CSTR *ServerPrincName,
|
||||||
ULONG *AuthnSvc, RPC_AUTH_IDENTITY_HANDLE *AuthIdentity, ULONG *AuthzSvc,
|
ULONG *AuthnSvc, RPC_AUTH_IDENTITY_HANDLE *AuthIdentity, ULONG *AuthzSvc,
|
||||||
ULONG RpcQosVersion, RPC_SECURITY_QOS *SecurityQOS )
|
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);
|
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,11 +1476,40 @@ RpcBindingInqAuthInfoExW( RPC_BINDING_HANDLE Binding, RPC_WSTR *ServerPrincName,
|
||||||
ULONG *AuthnSvc, RPC_AUTH_IDENTITY_HANDLE *AuthIdentity, ULONG *AuthzSvc,
|
ULONG *AuthnSvc, RPC_AUTH_IDENTITY_HANDLE *AuthIdentity, ULONG *AuthzSvc,
|
||||||
ULONG RpcQosVersion, RPC_SECURITY_QOS *SecurityQOS )
|
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);
|
AuthnSvc, AuthIdentity, AuthzSvc, RpcQosVersion, SecurityQOS);
|
||||||
|
|
||||||
|
if (!bind->AuthInfo) return RPC_S_BINDING_HAS_NO_AUTH;
|
||||||
|
|
||||||
|
if (SecurityQOS)
|
||||||
|
{
|
||||||
|
FIXME("QOS not implemented\n");
|
||||||
return RPC_S_INVALID_BINDING;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* RpcBindingInqAuthInfoA (RPCRT4.@)
|
* RpcBindingInqAuthInfoA (RPCRT4.@)
|
||||||
*/
|
*/
|
||||||
|
@ -1475,9 +1517,8 @@ RPCRTAPI RPC_STATUS RPC_ENTRY
|
||||||
RpcBindingInqAuthInfoA( RPC_BINDING_HANDLE Binding, RPC_CSTR *ServerPrincName, ULONG *AuthnLevel,
|
RpcBindingInqAuthInfoA( RPC_BINDING_HANDLE Binding, RPC_CSTR *ServerPrincName, ULONG *AuthnLevel,
|
||||||
ULONG *AuthnSvc, RPC_AUTH_IDENTITY_HANDLE *AuthIdentity, ULONG *AuthzSvc )
|
ULONG *AuthnSvc, RPC_AUTH_IDENTITY_HANDLE *AuthIdentity, ULONG *AuthzSvc )
|
||||||
{
|
{
|
||||||
FIXME("%p %p %p %p %p %p\n", Binding, ServerPrincName, AuthnLevel,
|
return RpcBindingInqAuthInfoExA(Binding, ServerPrincName, AuthnLevel, AuthnSvc, AuthIdentity,
|
||||||
AuthnSvc, AuthIdentity, AuthzSvc);
|
AuthzSvc, 0, NULL);
|
||||||
return RPC_S_INVALID_BINDING;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -1487,9 +1528,8 @@ RPCRTAPI RPC_STATUS RPC_ENTRY
|
||||||
RpcBindingInqAuthInfoW( RPC_BINDING_HANDLE Binding, RPC_WSTR *ServerPrincName, ULONG *AuthnLevel,
|
RpcBindingInqAuthInfoW( RPC_BINDING_HANDLE Binding, RPC_WSTR *ServerPrincName, ULONG *AuthnLevel,
|
||||||
ULONG *AuthnSvc, RPC_AUTH_IDENTITY_HANDLE *AuthIdentity, ULONG *AuthzSvc )
|
ULONG *AuthnSvc, RPC_AUTH_IDENTITY_HANDLE *AuthIdentity, ULONG *AuthzSvc )
|
||||||
{
|
{
|
||||||
FIXME("%p %p %p %p %p %p\n", Binding, ServerPrincName, AuthnLevel,
|
return RpcBindingInqAuthInfoExW(Binding, ServerPrincName, AuthnLevel, AuthnSvc, AuthIdentity,
|
||||||
AuthnSvc, AuthIdentity, AuthzSvc);
|
AuthzSvc, 0, NULL);
|
||||||
return RPC_S_INVALID_BINDING;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
|
Loading…
Reference in New Issue