missing changes during ntlmv2/ntlmssp auth and sign

Signed-off-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>

authored by Shirish Pargaonkar and committed by Steve French 3ec6bbcd 9fbc5908

+10 -5
+2
fs/cifs/cifsencrypt.c
··· 553 553 return 1; 554 554 } 555 555 556 + desc.tfm = tfm_arc4; 557 + 556 558 crypto_blkcipher_setkey(tfm_arc4, 557 559 server->session_key.data.ntlmv2.key, CIFS_CPHTXT_SIZE); 558 560 sg_init_one(&sgin, sec_key, CIFS_CPHTXT_SIZE);
+8 -5
fs/cifs/sess.c
··· 408 408 /* BB spec says that if AvId field of MsvAvTimestamp is populated then 409 409 we must set the MIC field of the AUTHENTICATE_MESSAGE */ 410 410 411 + ses->server->ntlmssp.server_flags = le32_to_cpu(pblob->NegotiateFlags); 412 + 411 413 tioffset = cpu_to_le16(pblob->TargetInfoArray.BufferOffset); 412 414 tilen = cpu_to_le16(pblob->TargetInfoArray.Length); 413 415 ses->server->tilen = tilen; ··· 442 440 /* BB is NTLMV2 session security format easier to use here? */ 443 441 flags = NTLMSSP_NEGOTIATE_56 | NTLMSSP_REQUEST_TARGET | 444 442 NTLMSSP_NEGOTIATE_128 | NTLMSSP_NEGOTIATE_UNICODE | 445 - NTLMSSP_NEGOTIATE_NT_ONLY | NTLMSSP_NEGOTIATE_NTLM; 443 + NTLMSSP_NEGOTIATE_NTLM; 446 444 if (ses->server->secMode & 447 - (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) 448 - flags |= NTLMSSP_NEGOTIATE_SIGN; 449 - if (ses->server->secMode & SECMODE_SIGN_REQUIRED) 450 - flags |= NTLMSSP_NEGOTIATE_ALWAYS_SIGN; 445 + (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) { 446 + flags |= NTLMSSP_NEGOTIATE_SIGN | 447 + NTLMSSP_NEGOTIATE_KEY_XCH | 448 + NTLMSSP_NEGOTIATE_EXTENDED_SEC; 449 + } 451 450 452 451 sec_blob->NegotiateFlags |= cpu_to_le32(flags); 453 452