diff options
author | Andrew Bartlett <abartlet@samba.org> | 2005-08-20 04:42:19 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:33:35 -0500 |
commit | 8e11003e214729462b7dcf46f09d47efc736e1e8 (patch) | |
tree | e03160e17f827cc014708cdef147df51e021ce19 /source4/auth/ntlmssp | |
parent | d5edfef3257ba624d8dbd0f3ffb6dc55afc955c8 (diff) | |
download | samba-8e11003e214729462b7dcf46f09d47efc736e1e8.tar.gz samba-8e11003e214729462b7dcf46f09d47efc736e1e8.tar.bz2 samba-8e11003e214729462b7dcf46f09d47efc736e1e8.zip |
r9411: Ensure we don't send a challenge without first getting a negotiate in
NTLMSSP, unless we are in datagram mode (not fully implemented yet).
Andrew Bartlett
(This used to be commit 727f5109421e9414a335e42e3ad3dd3ff19776bd)
Diffstat (limited to 'source4/auth/ntlmssp')
-rw-r--r-- | source4/auth/ntlmssp/ntlmssp.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source4/auth/ntlmssp/ntlmssp.c b/source4/auth/ntlmssp/ntlmssp.c index 1fd7ac6756..339c219f62 100644 --- a/source4/auth/ntlmssp/ntlmssp.c +++ b/source4/auth/ntlmssp/ntlmssp.c @@ -138,8 +138,14 @@ static NTSTATUS gensec_ntlmssp_update(struct gensec_security *gensec_security, ntlmssp_command = NTLMSSP_INITIAL; break; case NTLMSSP_SERVER: - /* 'datagram' mode - no neg packet */ - ntlmssp_command = NTLMSSP_NEGOTIATE; + if (gensec_security->want_features & GENSEC_FEATURE_DATAGRAM_MODE) { + /* 'datagram' mode - no neg packet */ + ntlmssp_command = NTLMSSP_NEGOTIATE; + } else { + /* This is normal in SPNEGO mech negotiation fallback */ + DEBUG(2, ("Failed to parse NTLMSSP packet: zero length\n")); + return NT_STATUS_INVALID_PARAMETER; + } break; } } else { |