aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/cifs/cifssmb.c32
1 files changed, 18 insertions, 14 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 9eef72492504..14dabbbd8134 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -621,22 +621,26 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses)
621 if ((pSMBr->hdr.Flags2 & SMBFLG2_EXT_SEC) && 621 if ((pSMBr->hdr.Flags2 & SMBFLG2_EXT_SEC) &&
622 (server->capabilities & CAP_EXTENDED_SECURITY)) { 622 (server->capabilities & CAP_EXTENDED_SECURITY)) {
623 count = pSMBr->ByteCount; 623 count = pSMBr->ByteCount;
624 if (count < 16) 624 if (count < 16) {
625 rc = -EIO; 625 rc = -EIO;
626 else if (count == 16) { 626 goto neg_err_exit;
627 server->secType = RawNTLMSSP; 627 }
628 if (server->socketUseCount.counter > 1) { 628
629 if (memcmp(server->server_GUID, 629 if (server->socketUseCount.counter > 1) {
630 pSMBr->u.extended_response. 630 if (memcmp(server->server_GUID,
631 GUID, 16) != 0) { 631 pSMBr->u.extended_response.
632 cFYI(1, ("server UID changed")); 632 GUID, 16) != 0) {
633 memcpy(server->server_GUID, 633 cFYI(1, ("server UID changed"));
634 pSMBr->u.extended_response.GUID,
635 16);
636 }
637 } else
638 memcpy(server->server_GUID, 634 memcpy(server->server_GUID,
639 pSMBr->u.extended_response.GUID, 16); 635 pSMBr->u.extended_response.GUID,
636 16);
637 }
638 } else
639 memcpy(server->server_GUID,
640 pSMBr->u.extended_response.GUID, 16);
641
642 if (count == 16) {
643 server->secType = RawNTLMSSP;
640 } else { 644 } else {
641 rc = decode_negTokenInit(pSMBr->u.extended_response. 645 rc = decode_negTokenInit(pSMBr->u.extended_response.
642 SecurityBlob, 646 SecurityBlob,