mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
torture-samlogon: Use "all_zero" where appropriate
... Saves a few bytes of footprint Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
6eeb3ec3ab
commit
b3d5fe9679
@ -921,14 +921,11 @@ static bool test_lmv2_ntlm_broken(struct samlogon_state *samlogon_state,
|
||||
pass = false;
|
||||
}
|
||||
} else {
|
||||
static const uint8_t zeros[8];
|
||||
if (memcmp(zeros, lm_session_key,
|
||||
sizeof(lm_session_key)) != 0) {
|
||||
if (!all_zero(lm_session_key,
|
||||
sizeof(lm_session_key))) {
|
||||
torture_comment(samlogon_state->tctx, "LM Session Key does not match expectations (zeros)!\n");
|
||||
torture_comment(samlogon_state->tctx, "lm_session_key:\n");
|
||||
dump_data(1, lm_session_key, 8);
|
||||
torture_comment(samlogon_state->tctx, "expected:\n");
|
||||
dump_data(1, zeros, 8);
|
||||
pass = false;
|
||||
}
|
||||
}
|
||||
@ -1176,14 +1173,10 @@ static bool test_ntlm2(struct samlogon_state *samlogon_state, char **error_strin
|
||||
pass = false;
|
||||
}
|
||||
} else {
|
||||
static const uint8_t zeros[8];
|
||||
if (memcmp(zeros, lm_key,
|
||||
sizeof(lm_key)) != 0) {
|
||||
if (!all_zero(lm_key, sizeof(lm_key))) {
|
||||
torture_comment(samlogon_state->tctx, "LM Session Key does not match expectations (zeros)!\n");
|
||||
torture_comment(samlogon_state->tctx, "lm_key:\n");
|
||||
dump_data(1, lm_key, 8);
|
||||
torture_comment(samlogon_state->tctx, "expected:\n");
|
||||
dump_data(1, zeros, 8);
|
||||
pass = false;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user