diff options
Diffstat (limited to 'fs/cifs/cifssmb.c')
-rw-r--r-- | fs/cifs/cifssmb.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 30742d8eef14..c65c3419dd37 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -597,13 +597,19 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses) | |||
597 | server->secType = RawNTLMSSP; | 597 | server->secType = RawNTLMSSP; |
598 | } else { | 598 | } else { |
599 | rc = decode_negTokenInit(pSMBr->u.extended_response. | 599 | rc = decode_negTokenInit(pSMBr->u.extended_response. |
600 | SecurityBlob, | 600 | SecurityBlob, count - 16, |
601 | count - 16, | 601 | server); |
602 | &server->secType); | ||
603 | if (rc == 1) | 602 | if (rc == 1) |
604 | rc = 0; | 603 | rc = 0; |
605 | else | 604 | else |
606 | rc = -EINVAL; | 605 | rc = -EINVAL; |
606 | |||
607 | if (server->sec_kerberos || server->sec_mskerberos) | ||
608 | server->secType = Kerberos; | ||
609 | else if (server->sec_ntlmssp) | ||
610 | server->secType = RawNTLMSSP; | ||
611 | else | ||
612 | rc = -EOPNOTSUPP; | ||
607 | } | 613 | } |
608 | } else | 614 | } else |
609 | server->capabilities &= ~CAP_EXTENDED_SECURITY; | 615 | server->capabilities &= ~CAP_EXTENDED_SECURITY; |