1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-24 21:49:29 +03:00

r6484: fix NTLMSSP client against w2k and w2k3

if we use lm_response = data_blob(NULL, 0);

we got NT_STATUS_INVALID_PARAMETER

(abartlet: we should maybe also give this error in our server code)

metze
This commit is contained in:
Stefan Metzmacher
2005-04-26 07:21:34 +00:00
committed by Gerald (Jerry) Carter
parent d31b4d7df3
commit be5e301442

View File

@ -177,6 +177,7 @@ NTSTATUS ntlmssp_client_challenge(struct gensec_security *gensec_security,
password = cli_credentials_get_password(gensec_security->credentials);
if (!password) {
static const uint8_t zero[1];
static const uint8_t zeros[16];
/* do nothing - blobs are zero length */
@ -184,6 +185,9 @@ NTSTATUS ntlmssp_client_challenge(struct gensec_security *gensec_security,
session_key = data_blob_talloc(gensec_ntlmssp_state, zeros, 16);
lm_session_key = data_blob_talloc(gensec_ntlmssp_state, zeros, 16);
lm_response = data_blob_talloc(gensec_ntlmssp_state, zero, 1);
nt_response = data_blob(NULL, 0);
/* not doing NLTM2 without a password */
gensec_ntlmssp_state->neg_flags &= ~NTLMSSP_NEGOTIATE_NTLM2;
} else if (gensec_ntlmssp_state->use_ntlmv2) {