mirror of
https://github.com/samba-team/samba.git
synced 2025-09-07 21:44:22 +03:00
Fix our NTLMSSP implementation against the Microsoft torture tester.
We need to return a version blob if we negotiate version info. Jeremy.
This commit is contained in:
@@ -520,22 +520,46 @@ static NTSTATUS ntlmssp_server_negotiate(struct ntlmssp_state *ntlmssp_state,
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
/* Marshel the packet in the right format, be it unicode or ASCII */
|
/* Marshal the packet in the right format, be it unicode or ASCII */
|
||||||
const char *gen_string;
|
const char *gen_string;
|
||||||
if (ntlmssp_state->unicode) {
|
/* "What Windows returns" as a version number. */
|
||||||
gen_string = "CdUdbddB";
|
const char vers[] = { 0x6, 0x1, 0xb0, 0x1d, 0, 0, 0, 0xf};
|
||||||
} else {
|
|
||||||
gen_string = "CdAdbddB";
|
|
||||||
}
|
|
||||||
|
|
||||||
msrpc_gen(ntlmssp_state, reply, gen_string,
|
if (chal_flags & NTLMSSP_NEGOTIATE_VERSION) {
|
||||||
"NTLMSSP",
|
DATA_BLOB version_blob = data_blob_talloc(ntlmssp_state, vers, 8);
|
||||||
NTLMSSP_CHALLENGE,
|
|
||||||
target_name,
|
if (ntlmssp_state->unicode) {
|
||||||
chal_flags,
|
gen_string = "CdUdbddBb";
|
||||||
cryptkey, 8,
|
} else {
|
||||||
0, 0,
|
gen_string = "CdAdbddBb";
|
||||||
struct_blob.data, struct_blob.length);
|
}
|
||||||
|
|
||||||
|
msrpc_gen(ntlmssp_state, reply, gen_string,
|
||||||
|
"NTLMSSP",
|
||||||
|
NTLMSSP_CHALLENGE,
|
||||||
|
target_name,
|
||||||
|
chal_flags,
|
||||||
|
cryptkey, 8,
|
||||||
|
0, 0,
|
||||||
|
struct_blob.data, struct_blob.length,
|
||||||
|
version_blob.data, version_blob.length);
|
||||||
|
data_blob_free(&version_blob);
|
||||||
|
} else {
|
||||||
|
if (ntlmssp_state->unicode) {
|
||||||
|
gen_string = "CdUdbddB";
|
||||||
|
} else {
|
||||||
|
gen_string = "CdAdbddB";
|
||||||
|
}
|
||||||
|
|
||||||
|
msrpc_gen(ntlmssp_state, reply, gen_string,
|
||||||
|
"NTLMSSP",
|
||||||
|
NTLMSSP_CHALLENGE,
|
||||||
|
target_name,
|
||||||
|
chal_flags,
|
||||||
|
cryptkey, 8,
|
||||||
|
0, 0,
|
||||||
|
struct_blob.data, struct_blob.length);
|
||||||
|
}
|
||||||
|
|
||||||
if (DEBUGLEVEL >= 10) {
|
if (DEBUGLEVEL >= 10) {
|
||||||
if (NT_STATUS_IS_OK(ntlmssp_pull_CHALLENGE_MESSAGE(reply,
|
if (NT_STATUS_IS_OK(ntlmssp_pull_CHALLENGE_MESSAGE(reply,
|
||||||
|
Reference in New Issue
Block a user