1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-03 04:22:09 +03:00

fix for UNICODE plaintext passwords (bug #59) and fix smbclient to send the unicode plain text password if negoitated

This commit is contained in:
Gerald Carter
-
parent c42318a068
commit e7d635af80
2 changed files with 20 additions and 4 deletions

View File

@ -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);
}