summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-05-21 16:12:07 +0000
committerGerald Carter <jerry@samba.org>2003-05-21 16:12:07 +0000
commitc52ee09afe06dce29118356078cc4c26b126afc6 (patch)
treed5f297b2f0cb0a2709bb83359ab2274118131745 /source3/smbd
parent7c11c9fd550c904c294981ad4c112eb94c63d7dd (diff)
downloadsamba-c52ee09afe06dce29118356078cc4c26b126afc6.tar.gz
samba-c52ee09afe06dce29118356078cc4c26b126afc6.tar.bz2
samba-c52ee09afe06dce29118356078cc4c26b126afc6.zip
fix for UNICODE plaintext passwords (bug #59) and fix smbclient to send the unicode plain text password if negoitated
(This used to be commit e7d635af80c844f17ff9f34c26c1e9c978951ce1)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/sesssetup.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 8840d4e759..44131b1752 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -620,8 +620,11 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,
nt_resp = data_blob(p+passlen1, passlen2);
} else {
pstring pass;
+ BOOL unic;
+ unic=SVAL(inbuf, smb_flg2) & FLAGS2_UNICODE_STRINGS;
srvstr_pull(inbuf, pass, smb_buf(inbuf),
- sizeof(pass), passlen1, STR_TERMINATE);
+ sizeof(pass), unic ? passlen2 : passlen1,
+ STR_TERMINATE);
plaintext_password = data_blob(pass, strlen(pass)+1);
}