1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-20 22:50:26 +03:00

s4-torture: fill in ntlmssp_NEGOTIATE_MESSAGE_check().

Guenther

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11804

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 68d043faa0aa9e5e0d289806e1aa2acba3f07af5)
This commit is contained in:
Günther Deschner 2015-11-17 18:27:29 +01:00 committed by Stefan Metzmacher
parent 1865f1240f
commit 109618bd6d

View File

@ -2,7 +2,7 @@
Unix SMB/CIFS implementation.
test suite for ntlmssp ndr operations
Copyright (C) Guenther Deschner 2010
Copyright (C) Guenther Deschner 2010,2015
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -33,6 +33,24 @@ static const uint8_t ntlmssp_NEGOTIATE_MESSAGE_data[] = {
static bool ntlmssp_NEGOTIATE_MESSAGE_check(struct torture_context *tctx,
struct NEGOTIATE_MESSAGE *r)
{
torture_assert_str_equal(tctx, r->Signature, "NTLMSSP", "Signature");
torture_assert_int_equal(tctx, r->MessageType, NtLmNegotiate, "MessageType");
torture_assert_int_equal(tctx, r->NegotiateFlags, 0xe2088297, "NegotiateFlags");
torture_assert_int_equal(tctx, r->DomainNameLen, 0, "DomainNameLen");
torture_assert_int_equal(tctx, r->DomainNameMaxLen, 0, "DomainNameMaxLen");
torture_assert(tctx, r->DomainName == NULL, "DomainName");
torture_assert_int_equal(tctx, r->WorkstationLen, 0, "WorkstationLen");
torture_assert_int_equal(tctx, r->WorkstationMaxLen, 0, "WorkstationMaxLen");
torture_assert(tctx, r->Workstation == NULL, "Workstation");
torture_assert_int_equal(tctx, r->Version.version.ProductMajorVersion, NTLMSSP_WINDOWS_MAJOR_VERSION_6, "ProductMajorVersion");
torture_assert_int_equal(tctx, r->Version.version.ProductMinorVersion, NTLMSSP_WINDOWS_MINOR_VERSION_1, "ProductMinorVersion");
torture_assert_int_equal(tctx, r->Version.version.ProductBuild, 0x1db0, "ProductBuild");
torture_assert_int_equal(tctx, r->Version.version.Reserved[0], 0x00, "Reserved");
torture_assert_int_equal(tctx, r->Version.version.Reserved[1], 0x00, "Reserved");
torture_assert_int_equal(tctx, r->Version.version.Reserved[2], 0x00, "Reserved");
torture_assert_int_equal(tctx, r->Version.version.Reserved[3], 0x00, "Reserved");
torture_assert_int_equal(tctx, r->Version.version.NTLMRevisionCurrent, NTLMSSP_REVISION_W2K3, "NTLMRevisionCurrent");
return true;
}