svn commit: samba r21039 - in branches/SAMBA_4_0/source:
auth/ntlmssp torture/auth
abartlet at samba.org
abartlet at samba.org
Sun Jan 28 07:58:40 GMT 2007
Author: abartlet
Date: 2007-01-28 07:58:39 +0000 (Sun, 28 Jan 2007)
New Revision: 21039
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21039
Log:
Test some more failure paths (trying to increase the lcov score).
Andrew Bartlett
Modified:
branches/SAMBA_4_0/source/auth/ntlmssp/ntlmssp_sign.c
branches/SAMBA_4_0/source/torture/auth/ntlmssp.c
Changeset:
Modified: branches/SAMBA_4_0/source/auth/ntlmssp/ntlmssp_sign.c
===================================================================
--- branches/SAMBA_4_0/source/auth/ntlmssp/ntlmssp_sign.c 2007-01-28 01:05:47 UTC (rev 21038)
+++ branches/SAMBA_4_0/source/auth/ntlmssp/ntlmssp_sign.c 2007-01-28 07:58:39 UTC (rev 21039)
@@ -167,11 +167,6 @@
return NT_STATUS_NO_USER_SESSION_KEY;
}
- if (sig->length < 8) {
- DEBUG(1, ("NTLMSSP packet check failed due to short signature (%lu bytes)!\n",
- (unsigned long)sig->length));
- }
-
nt_status = ntlmssp_make_packet_signature(gensec_ntlmssp_state, sig_mem_ctx,
data, length,
whole_pdu, pdu_length,
Modified: branches/SAMBA_4_0/source/torture/auth/ntlmssp.c
===================================================================
--- branches/SAMBA_4_0/source/torture/auth/ntlmssp.c 2007-01-28 01:05:47 UTC (rev 21038)
+++ branches/SAMBA_4_0/source/torture/auth/ntlmssp.c 2007-01-28 07:58:39 UTC (rev 21039)
@@ -131,6 +131,13 @@
data.data, data.length, data.data, data.length, &sig),
NT_STATUS_ACCESS_DENIED, "Check of just signed packet (should fail, wrong end)");
+ sig.length /= 2;
+
+ torture_assert_ntstatus_equal(tctx,
+ gensec_ntlmssp_check_packet(gensec_security, gensec_security,
+ data.data, data.length, data.data, data.length, &sig),
+ NT_STATUS_ACCESS_DENIED, "Check of just signed packet with short sig");
+
talloc_free(gensec_security);
return true;
}
More information about the samba-cvs
mailing list