Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213414
b: refs/heads/master
c: c9928f7
h: refs/heads/master
v: v3
  • Loading branch information
Shirish Pargaonkar authored and Steve French committed Oct 6, 2010
1 parent 8bb7c59 commit 1df1b65
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 29e07c82a9e8acebbb38ecc22b0b5005a0a5d839
refs/heads/master: c9928f7040a6e5f39e028bea500e0fde910d4a96
9 changes: 6 additions & 3 deletions trunk/fs/cifs/sess.c
Original file line number Diff line number Diff line change
Expand Up @@ -739,9 +739,6 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses,
pSMB->req_no_secext.CaseInsensitivePasswordLength = 0;
/* cpu_to_le16(LM2_SESS_KEY_SIZE); */

pSMB->req_no_secext.CaseSensitivePasswordLength =
cpu_to_le16(sizeof(struct ntlmv2_resp));

/* calculate session key */
rc = setup_ntlmv2_rsp(ses, v2_sess_key, nls_cp);
if (rc) {
Expand All @@ -753,6 +750,11 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses,
sizeof(struct ntlmv2_resp));
bcc_ptr += sizeof(struct ntlmv2_resp);
kfree(v2_sess_key);
/* set case sensitive password length after tilen may get
* assigned, tilen is 0 otherwise.
*/
pSMB->req_no_secext.CaseSensitivePasswordLength =
cpu_to_le16(sizeof(struct ntlmv2_resp) + ses->tilen);
if (ses->tilen > 0) {
memcpy(bcc_ptr, ses->tiblob, ses->tilen);
bcc_ptr += ses->tilen;
Expand All @@ -761,6 +763,7 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses,
ses->tiblob = NULL;
ses->tilen = 0;
}

if (ses->capabilities & CAP_UNICODE) {
if (iov[0].iov_len % 2) {
*bcc_ptr = 0;
Expand Down

0 comments on commit 1df1b65

Please sign in to comment.