diff options
author | Shirish Pargaonkar <shirishpargaonkar@gmail.com> | 2011-10-20 20:21:59 +0200 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2011-10-30 04:06:54 +0100 |
commit | 9ef5992e442b2b0bf6364bfcc5574e983a983159 (patch) | |
tree | ffd83c890d6d82c525b6030e49b483fee194a8a9 /fs/cifs/connect.c | |
parent | CIFS: Fix the VFS brlock cache usage in posix locking case (diff) | |
download | linux-9ef5992e442b2b0bf6364bfcc5574e983a983159.tar.xz linux-9ef5992e442b2b0bf6364bfcc5574e983a983159.zip |
cifs: Assume passwords are encoded according to iocharset (try #2)
Re-posting a patch originally posted by Oskar Liljeblad after
rebasing on 3.2.
Modify cifs to assume that the supplied password is encoded according
to iocharset. Before this patch passwords would be treated as
raw 8-bit data, which made authentication with Unicode passwords impossible
(at least passwords with characters > 0xFF).
The previous code would as a side effect accept passwords encoded with
ISO 8859-1, since Unicode < 0x100 basically is ISO 8859-1. Software which
relies on that will no longer support password chars > 0x7F unless it also
uses iocharset=iso8859-1. (mount.cifs does not care about the encoding so
it will work as expected.)
Signed-off-by: Oskar Liljeblad <oskar@osk.mine.nu>
Signed-off-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Reviewed-by: Pavel Shilovsky <piastry@etersoft.ru>
Tested-by: A <nimbus1_03087@yahoo.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index d545a95c30ed..c0458c543f17 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -3452,7 +3452,7 @@ CIFSTCon(unsigned int xid, struct cifs_ses *ses, else #endif /* CIFS_WEAK_PW_HASH */ rc = SMBNTencrypt(tcon->password, ses->server->cryptkey, - bcc_ptr); + bcc_ptr, nls_codepage); bcc_ptr += CIFS_AUTH_RESP_SIZE; if (ses->capabilities & CAP_UNICODE) { |