Re: [PATCH] allow cifs passwords with utf8 characters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sunday, March 27, 2011 at 09:44, Oskar Liljeblad wrote:
> I noticed that I could not mount cifs shares when the password contained
> utf8-encoded latin1 characters. (But somehow it worked when those latin1
> characters were encoded with ISO-8859-1.) So I made some modifications to
> assume utf8 passwords rather than raw 8-bit.
[..]
> +		len = utf8s_to_ucs2(passwd, 128, (wchar_t *) wpwd);

Looking at the code again, I wonder if not cifs_strtoUCS in cifs_unicode.c
should've been used instead?

  int
  cifs_strtoUCS(__le16 *to, const char *from, int len,
              const struct nls_table *codepage)

(I suspect people don't look so happily on exporting more symbols either
(utf8s_to_ucs2).)

The problem with cifs_strtoUCS is the codepage parameter though. Can one
assume that the "iocharset" codepage is used for the password as well?

Regards,

Oskar
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux