diff options
Diffstat (limited to 'fs/cifs/sess.c')
| -rw-r--r-- | fs/cifs/sess.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c index 1cffd82c4f13..1adc9625a344 100644 --- a/fs/cifs/sess.c +++ b/fs/cifs/sess.c | |||
| @@ -277,7 +277,7 @@ static void ascii_ssetup_strings(char **pbcc_area, struct cifsSesInfo *ses, | |||
| 277 | } | 277 | } |
| 278 | 278 | ||
| 279 | static void | 279 | static void |
| 280 | decode_unicode_ssetup(char **pbcc_area, int bleft, struct cifsSesInfo *ses, | 280 | decode_unicode_ssetup(char **pbcc_area, __u16 bleft, struct cifsSesInfo *ses, |
| 281 | const struct nls_table *nls_cp) | 281 | const struct nls_table *nls_cp) |
| 282 | { | 282 | { |
| 283 | int len; | 283 | int len; |
| @@ -323,7 +323,7 @@ decode_unicode_ssetup(char **pbcc_area, int bleft, struct cifsSesInfo *ses, | |||
| 323 | return; | 323 | return; |
| 324 | } | 324 | } |
| 325 | 325 | ||
| 326 | static int decode_ascii_ssetup(char **pbcc_area, int bleft, | 326 | static int decode_ascii_ssetup(char **pbcc_area, __u16 bleft, |
| 327 | struct cifsSesInfo *ses, | 327 | struct cifsSesInfo *ses, |
| 328 | const struct nls_table *nls_cp) | 328 | const struct nls_table *nls_cp) |
| 329 | { | 329 | { |
| @@ -575,12 +575,11 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
| 575 | char *str_area; | 575 | char *str_area; |
| 576 | SESSION_SETUP_ANDX *pSMB; | 576 | SESSION_SETUP_ANDX *pSMB; |
| 577 | __u32 capabilities; | 577 | __u32 capabilities; |
| 578 | int count; | 578 | __u16 count; |
| 579 | int resp_buf_type; | 579 | int resp_buf_type; |
| 580 | struct kvec iov[3]; | 580 | struct kvec iov[3]; |
| 581 | enum securityEnum type; | 581 | enum securityEnum type; |
| 582 | __u16 action; | 582 | __u16 action, bytes_remaining; |
| 583 | int bytes_remaining; | ||
| 584 | struct key *spnego_key = NULL; | 583 | struct key *spnego_key = NULL; |
| 585 | __le32 phase = NtLmNegotiate; /* NTLMSSP, if needed, is multistage */ | 584 | __le32 phase = NtLmNegotiate; /* NTLMSSP, if needed, is multistage */ |
| 586 | u16 blob_len; | 585 | u16 blob_len; |
| @@ -876,7 +875,7 @@ ssetup_ntlmssp_authenticate: | |||
| 876 | count = iov[1].iov_len + iov[2].iov_len; | 875 | count = iov[1].iov_len + iov[2].iov_len; |
| 877 | smb_buf->smb_buf_length += count; | 876 | smb_buf->smb_buf_length += count; |
| 878 | 877 | ||
| 879 | BCC_LE(smb_buf) = cpu_to_le16(count); | 878 | put_bcc_le(count, smb_buf); |
| 880 | 879 | ||
| 881 | rc = SendReceive2(xid, ses, iov, 3 /* num_iovecs */, &resp_buf_type, | 880 | rc = SendReceive2(xid, ses, iov, 3 /* num_iovecs */, &resp_buf_type, |
| 882 | CIFS_LOG_ERROR); | 881 | CIFS_LOG_ERROR); |
| @@ -910,7 +909,7 @@ ssetup_ntlmssp_authenticate: | |||
| 910 | cFYI(1, "UID = %d ", ses->Suid); | 909 | cFYI(1, "UID = %d ", ses->Suid); |
| 911 | /* response can have either 3 or 4 word count - Samba sends 3 */ | 910 | /* response can have either 3 or 4 word count - Samba sends 3 */ |
| 912 | /* and lanman response is 3 */ | 911 | /* and lanman response is 3 */ |
| 913 | bytes_remaining = BCC(smb_buf); | 912 | bytes_remaining = get_bcc(smb_buf); |
| 914 | bcc_ptr = pByteArea(smb_buf); | 913 | bcc_ptr = pByteArea(smb_buf); |
| 915 | 914 | ||
| 916 | if (smb_buf->WordCount == 4) { | 915 | if (smb_buf->WordCount == 4) { |
