mirror of
https://github.com/samba-team/samba.git
synced 2025-03-12 20:58:37 +03:00
Fix for bug #815. Make plaintext unicode passwords work with NT4.x
Jeremy.
This commit is contained in:
parent
05afc34086
commit
ba0b5b8c9b
@ -689,11 +689,17 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,
|
|||||||
nt_resp = data_blob(p+passlen1, passlen2);
|
nt_resp = data_blob(p+passlen1, passlen2);
|
||||||
} else {
|
} else {
|
||||||
pstring pass;
|
pstring pass;
|
||||||
BOOL unic;
|
BOOL unic=SVAL(inbuf, smb_flg2) & FLAGS2_UNICODE_STRINGS;
|
||||||
unic=SVAL(inbuf, smb_flg2) & FLAGS2_UNICODE_STRINGS;
|
|
||||||
srvstr_pull(inbuf, pass, smb_buf(inbuf),
|
if ((ra_type == RA_WINNT) && (passlen2 == 0) && unic && passlen1) {
|
||||||
sizeof(pass), unic ? passlen2 : passlen1,
|
/* NT4.0 stuffs up plaintext unicode password lengths... */
|
||||||
STR_TERMINATE);
|
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);
|
plaintext_password = data_blob(pass, strlen(pass)+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user