summaryrefslogtreecommitdiff
path: root/source4/auth/ntlmssp
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-04-26 07:21:34 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:16:19 -0500
commita09593c37a307388c0fed175d70c896a9d2d47db (patch)
tree0879f7f310914f960f2ba1975cc215c07d8a5e35 /source4/auth/ntlmssp
parent39b2178fc998c9811636a67546d0818df6ca14c7 (diff)
downloadsamba-a09593c37a307388c0fed175d70c896a9d2d47db.tar.gz
samba-a09593c37a307388c0fed175d70c896a9d2d47db.tar.bz2
samba-a09593c37a307388c0fed175d70c896a9d2d47db.zip
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 used to be commit be5e301442c442a37bb6756d12b9f1452d634a17)
Diffstat (limited to 'source4/auth/ntlmssp')
-rw-r--r--source4/auth/ntlmssp/ntlmssp_client.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/auth/ntlmssp/ntlmssp_client.c b/source4/auth/ntlmssp/ntlmssp_client.c
index e249fb66f4..df5cbab524 100644
--- a/source4/auth/ntlmssp/ntlmssp_client.c
+++ b/source4/auth/ntlmssp/ntlmssp_client.c
@@ -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) {