1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-15 16:23:49 +03:00

r2515: Fixes from smbtorture - these session keys are not individually encrypted.

Andrew Bartlett
This commit is contained in:
Andrew Bartlett
2004-09-22 12:17:51 +00:00
committed by Gerald (Jerry) Carter
parent fd10c9dd53
commit 131420b45e

View File

@@ -604,8 +604,10 @@ static NTSTATUS netr_LogonSamLogonWithFlags(struct dcesrv_call_state *dce_call,
}
/* Don't crypt an all-zero key, it would give away the NETLOGON pipe session key */
if (memcmp(sam->key.key, zeros,
sizeof(sam->key.key)) != 0) {
/* It appears that level 6 is not individually encrypted */
if ((r->in.validation_level != 6)
&& memcmp(sam->key.key, zeros,
sizeof(sam->key.key)) != 0) {
creds_arcfour_crypt(pipe_state->creds,
sam->key.key,
sizeof(sam->key.key));
@@ -619,8 +621,10 @@ static NTSTATUS netr_LogonSamLogonWithFlags(struct dcesrv_call_state *dce_call,
}
/* Don't crypt an all-zero key, it would give away the NETLOGON pipe session key */
if (memcmp(sam->LMSessKey.key, zeros,
sizeof(sam->LMSessKey.key)) != 0) {
/* It appears that level 6 is not individually encrypted */
if ((r->in.validation_level != 6)
&& memcmp(sam->LMSessKey.key, zeros,
sizeof(sam->LMSessKey.key)) != 0) {
creds_arcfour_crypt(pipe_state->creds,
sam->LMSessKey.key,
sizeof(sam->LMSessKey.key));