summaryrefslogtreecommitdiff
path: root/source3/smbd/negprot.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2002-07-30 15:03:14 +0000
committerAndrew Tridgell <tridge@samba.org>2002-07-30 15:03:14 +0000
commit9edc1cd4cfd3c02cfb1b867f8450384c446e8b60 (patch)
tree4b041804db2b9e9da316f1137e5c6260ba5458a3 /source3/smbd/negprot.c
parent28f4463c8b6608dce02311ea7271fc983aa76d56 (diff)
downloadsamba-9edc1cd4cfd3c02cfb1b867f8450384c446e8b60.tar.gz
samba-9edc1cd4cfd3c02cfb1b867f8450384c446e8b60.tar.bz2
samba-9edc1cd4cfd3c02cfb1b867f8450384c446e8b60.zip
this fixes plaintext passwords with win2000
there were 2 bugs: 1) we were sending a null challenge when we should have sent an empty challenge 2) the password can be in unicode if unicode is negotiated. This means our client code was wrong too :( (This used to be commit 1a6dfddf6788b30fc81794b1bfe749693183b2c1)
Diffstat (limited to 'source3/smbd/negprot.c')
-rw-r--r--source3/smbd/negprot.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c
index abe44aac8c..d8aea624be 100644
--- a/source3/smbd/negprot.c
+++ b/source3/smbd/negprot.c
@@ -288,10 +288,12 @@ static int reply_nt1(char *inbuf, char *outbuf)
if (!negotiate_spnego) {
/* Create a token value and add it to the outgoing packet. */
if (global_encrypted_passwords_negotiated) {
+ /* note that we do not send a challenge at all if
+ we are using plaintext */
get_challenge(p);
+ SSVALS(outbuf,smb_vwv16+1,8);
+ p += 8;
}
- SSVALS(outbuf,smb_vwv16+1,8);
- p += 8;
p += srvstr_push(outbuf, p, global_myworkgroup, -1,
STR_UNICODE|STR_TERMINATE|STR_NOALIGN);
DEBUG(3,("not using SPNEGO\n"));