Commit f8450fae authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

rpcrt4: Handle NULL binding in RpcBindingInqAuthClient{,Ex}.

parent 786633e3
......@@ -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);
......
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