mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
rpcrt4: Add structure definition for RPC AUTH3 packet and use the size of this on sending to fix authentication against native servers.
Also use the new size to validate incoming AUTH3 packets to be consistent with native.
This commit is contained in:
parent
7222e8b665
commit
c66972dfba
@ -139,6 +139,13 @@ typedef struct
|
||||
unsigned short num_data_items;
|
||||
} RpcPktHttpHdr;
|
||||
|
||||
/* AUTH3 packet */
|
||||
typedef struct
|
||||
{
|
||||
RpcPktCommonHdr common;
|
||||
unsigned int pad; /* ignored */
|
||||
} RpcPktAuth3Hdr;
|
||||
|
||||
/* Union representing all possible packet headers */
|
||||
typedef union
|
||||
{
|
||||
@ -150,6 +157,7 @@ typedef union
|
||||
RpcPktBindAckHdr bind_ack;
|
||||
RpcPktBindNAckHdr bind_nack;
|
||||
RpcPktHttpHdr http;
|
||||
RpcPktAuth3Hdr auth3;
|
||||
} RpcPktHdr;
|
||||
|
||||
typedef struct
|
||||
|
@ -59,7 +59,7 @@ DWORD RPCRT4_GetHeaderSize(const RpcPktHdr *Header)
|
||||
sizeof(Header->request), 0, sizeof(Header->response),
|
||||
sizeof(Header->fault), 0, 0, 0, 0, 0, 0, 0, sizeof(Header->bind),
|
||||
sizeof(Header->bind_ack), sizeof(Header->bind_nack),
|
||||
0, 0, sizeof(Header->common), 0, 0, 0, sizeof(Header->http)
|
||||
0, 0, sizeof(Header->auth3), 0, 0, 0, sizeof(Header->http)
|
||||
};
|
||||
ULONG ret = 0;
|
||||
|
||||
@ -217,12 +217,12 @@ static RpcPktHdr *RPCRT4_BuildAuthHeader(ULONG DataRepresentation)
|
||||
RpcPktHdr *header;
|
||||
|
||||
header = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
||||
sizeof(header->common));
|
||||
sizeof(header->auth3));
|
||||
if (header == NULL)
|
||||
return NULL;
|
||||
|
||||
RPCRT4_BuildCommonHeader(header, PKT_AUTH3, DataRepresentation);
|
||||
header->common.frag_len = sizeof(header->common);
|
||||
header->common.frag_len = sizeof(header->auth3);
|
||||
|
||||
return header;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user