mirror of
https://github.com/reactos/wine.git
synced 2024-11-26 05:00:30 +00:00
rpcrt4: Use SecInvalidateHandle and SecIsValidHandle for handling RpcConnection::ctx instead of setting/comparing the field to 0.
This commit is contained in:
parent
51dd6f9fb8
commit
8bb10f1082
@ -485,8 +485,7 @@ static void RPCRT4_AuthNegotiate(RpcConnection *conn, SecBuffer *out)
|
||||
out_desc.pBuffers = out;
|
||||
|
||||
conn->attr = 0;
|
||||
conn->ctx.dwLower = 0;
|
||||
conn->ctx.dwUpper = 0;
|
||||
SecInvalidateHandle(&conn->ctx);
|
||||
|
||||
r = InitializeSecurityContextA(&conn->AuthInfo->cred, NULL, NULL,
|
||||
context_req, 0, SECURITY_NETWORK_DREP,
|
||||
@ -567,7 +566,7 @@ RPC_STATUS RPCRT4_Send(RpcConnection *Connection, RpcPktHdr *Header,
|
||||
if (!Connection->AuthInfo ||
|
||||
Connection->AuthInfo->AuthnLevel == RPC_C_AUTHN_LEVEL_DEFAULT ||
|
||||
Connection->AuthInfo->AuthnLevel == RPC_C_AUTHN_LEVEL_NONE ||
|
||||
(Connection->ctx.dwUpper || Connection->ctx.dwLower))
|
||||
SecIsValidHandle(&Connection->ctx))
|
||||
{
|
||||
return RPCRT4_SendAuth(Connection, Header, Buffer, BufferLength, NULL, 0);
|
||||
}
|
||||
|
@ -1309,7 +1309,7 @@ RPC_STATUS RPCRT4_CreateConnection(RpcConnection** Connection, BOOL server,
|
||||
memset(&NewConnection->ActiveInterface, 0, sizeof(NewConnection->ActiveInterface));
|
||||
NewConnection->NextCallId = 1;
|
||||
|
||||
memset(&NewConnection->ctx, 0, sizeof(NewConnection->ctx));
|
||||
SecInvalidateHandle(&NewConnection->ctx);
|
||||
if (AuthInfo) RpcAuthInfo_AddRef(AuthInfo);
|
||||
NewConnection->AuthInfo = AuthInfo;
|
||||
list_init(&NewConnection->conn_pool_entry);
|
||||
|
Loading…
Reference in New Issue
Block a user