rpcrt4: Handle NULL binding in RpcBindingInqAuthClient{,Ex}.
Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
786633e311
commit
f8450fae23
|
@ -1621,11 +1621,15 @@ RpcBindingInqAuthClientExW( RPC_BINDING_HANDLE ClientBinding, RPC_AUTHZ_HANDLE *
|
|||
RPC_WSTR *ServerPrincName, ULONG *AuthnLevel, ULONG *AuthnSvc,
|
||||
ULONG *AuthzSvc, ULONG Flags )
|
||||
{
|
||||
RpcBinding *bind = ClientBinding;
|
||||
RpcBinding *bind;
|
||||
|
||||
TRACE("%p %p %p %p %p %p 0x%x\n", ClientBinding, Privs, ServerPrincName, AuthnLevel,
|
||||
AuthnSvc, AuthzSvc, Flags);
|
||||
|
||||
if (!ClientBinding) ClientBinding = I_RpcGetCurrentCallHandle();
|
||||
if (!ClientBinding) return RPC_S_INVALID_BINDING;
|
||||
|
||||
bind = ClientBinding;
|
||||
if (!bind->FromConn) return RPC_S_INVALID_BINDING;
|
||||
|
||||
return rpcrt4_conn_inquire_auth_client(bind->FromConn, Privs,
|
||||
|
|
|
@ -1525,6 +1525,15 @@ void __cdecl s_authinfo_test(unsigned int protseq, int secure)
|
|||
}
|
||||
ok(level == RPC_C_AUTHN_LEVEL_PKT_PRIVACY, "level unchanged\n");
|
||||
ok(authnsvc == RPC_C_AUTHN_WINNT, "authnsvc unchanged\n");
|
||||
RpcStringFreeA(&principal);
|
||||
|
||||
status = RpcBindingInqAuthClientA(NULL, &privs, &principal, &level, &authnsvc, NULL);
|
||||
ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status);
|
||||
RpcStringFreeA(&principal);
|
||||
|
||||
status = RpcBindingInqAuthClientExA(NULL, &privs, &principal, &level, &authnsvc, NULL, 0);
|
||||
ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status);
|
||||
RpcStringFreeA(&principal);
|
||||
|
||||
status = RpcImpersonateClient(NULL);
|
||||
ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status);
|
||||
|
|
Loading…
Reference in New Issue