diff options
-rw-r--r-- | fs/cifs/CHANGES | 4 | ||||
-rw-r--r-- | fs/cifs/connect.c | 9 |
2 files changed, 9 insertions, 4 deletions
diff --git a/fs/cifs/CHANGES b/fs/cifs/CHANGES index dfd364c66313..7271bb0257f6 100644 --- a/fs/cifs/CHANGES +++ b/fs/cifs/CHANGES | |||
@@ -1,7 +1,9 @@ | |||
1 | Version 1.43 | 1 | Version 1.43 |
2 | ------------ | 2 | ------------ |
3 | POSIX locking to servers which support CIFS POSIX Extensions | 3 | POSIX locking to servers which support CIFS POSIX Extensions |
4 | (disabled by default controlled by proc/fs/cifs/Experimental) | 4 | (disabled by default controlled by proc/fs/cifs/Experimental). |
5 | Handle conversion of long share names (especially Asian languages) | ||
6 | to Unicode during mount. | ||
5 | 7 | ||
6 | Version 1.42 | 8 | Version 1.42 |
7 | ------------ | 9 | ------------ |
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index d2ec806a4f32..105544b0a275 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -3282,7 +3282,8 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses, | |||
3282 | bcc_ptr++; /* align */ | 3282 | bcc_ptr++; /* align */ |
3283 | } | 3283 | } |
3284 | 3284 | ||
3285 | if(ses->server->secMode & (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) | 3285 | if(ses->server->secMode & |
3286 | (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) | ||
3286 | smb_buffer->Flags2 |= SMBFLG2_SECURITY_SIGNATURE; | 3287 | smb_buffer->Flags2 |= SMBFLG2_SECURITY_SIGNATURE; |
3287 | 3288 | ||
3288 | if (ses->capabilities & CAP_STATUS32) { | 3289 | if (ses->capabilities & CAP_STATUS32) { |
@@ -3294,8 +3295,10 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses, | |||
3294 | if (ses->capabilities & CAP_UNICODE) { | 3295 | if (ses->capabilities & CAP_UNICODE) { |
3295 | smb_buffer->Flags2 |= SMBFLG2_UNICODE; | 3296 | smb_buffer->Flags2 |= SMBFLG2_UNICODE; |
3296 | length = | 3297 | length = |
3297 | cifs_strtoUCS((__le16 *) bcc_ptr, tree, 100, nls_codepage); | 3298 | cifs_strtoUCS((__le16 *) bcc_ptr, tree, |
3298 | bcc_ptr += 2 * length; /* convert num of 16 bit words to bytes */ | 3299 | 6 /* max utf8 char length in bytes */ * |
3300 | (/* server len*/ + 256 /* share len */), nls_codepage); | ||
3301 | bcc_ptr += 2 * length; /* convert num 16 bit words to bytes */ | ||
3299 | bcc_ptr += 2; /* skip trailing null */ | 3302 | bcc_ptr += 2; /* skip trailing null */ |
3300 | } else { /* ASCII */ | 3303 | } else { /* ASCII */ |
3301 | strcpy(bcc_ptr, tree); | 3304 | strcpy(bcc_ptr, tree); |