? .configure.swp ? client_oplocks.txt ? dosmode.patch ? macosxfs-integration.patch ? patch_tdbsam.diffs Index: smbd/sesssetup.c =================================================================== RCS file: /data/cvs/samba/source/smbd/sesssetup.c,v retrieving revision 1.50.2.42 diff -u -r1.50.2.42 sesssetup.c --- smbd/sesssetup.c 5 Dec 2003 21:51:51 -0000 1.50.2.42 +++ smbd/sesssetup.c 12 Dec 2003 22:53:43 -0000 @@ -689,11 +689,17 @@ 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), unic ? passlen2 : passlen1, - STR_TERMINATE); + BOOL unic=SVAL(inbuf, smb_flg2) & FLAGS2_UNICODE_STRINGS; + + if ((ra_type == RA_WINNT) && (passlen2 == 0) && unic && passlen1) { + /* NT4.0 stuffs up plaintext unicode password lengths... */ + srvstr_pull(inbuf, pass, smb_buf(inbuf) + 1, + sizeof(pass), passlen1, STR_TERMINATE); + } else { + srvstr_pull(inbuf, pass, smb_buf(inbuf), + sizeof(pass), unic ? passlen2 : passlen1, + STR_TERMINATE); + } plaintext_password = data_blob(pass, strlen(pass)+1); }