diff options
author | Steve French <sfrench@us.ibm.com> | 2006-05-30 18:04:19 +0000 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2006-05-30 18:04:19 +0000 |
commit | a878fb2218c87fe66f2bcf3914840e24c41338f7 (patch) | |
tree | 61d958f40abe8db8ef8cc2a34dcae4c7aea8fc64 /fs | |
parent | fc94cdb94462e71a4a974bc9bc1f483189ae7805 (diff) | |
download | blackbird-op-linux-a878fb2218c87fe66f2bcf3914840e24c41338f7.tar.gz blackbird-op-linux-a878fb2218c87fe66f2bcf3914840e24c41338f7.zip |
[CIFS] Do not limit the length of share names (was 100 for whole UNC name)
during mount. Especially important for some non-Western languages.
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs')
-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 @@ Version 1.43 ------------ POSIX locking to servers which support CIFS POSIX Extensions -(disabled by default controlled by proc/fs/cifs/Experimental) +(disabled by default controlled by proc/fs/cifs/Experimental). +Handle conversion of long share names (especially Asian languages) +to Unicode during mount. Version 1.42 ------------ 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, bcc_ptr++; /* align */ } - if(ses->server->secMode & (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) + if(ses->server->secMode & + (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) smb_buffer->Flags2 |= SMBFLG2_SECURITY_SIGNATURE; if (ses->capabilities & CAP_STATUS32) { @@ -3294,8 +3295,10 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses, if (ses->capabilities & CAP_UNICODE) { smb_buffer->Flags2 |= SMBFLG2_UNICODE; length = - cifs_strtoUCS((__le16 *) bcc_ptr, tree, 100, nls_codepage); - bcc_ptr += 2 * length; /* convert num of 16 bit words to bytes */ + cifs_strtoUCS((__le16 *) bcc_ptr, tree, + 6 /* max utf8 char length in bytes */ * + (/* server len*/ + 256 /* share len */), nls_codepage); + bcc_ptr += 2 * length; /* convert num 16 bit words to bytes */ bcc_ptr += 2; /* skip trailing null */ } else { /* ASCII */ strcpy(bcc_ptr, tree); |