linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Namjae Jeon <linkinjeon@kernel.org>
To: "Atte Heikkilä" <atteh.mailbox@gmail.com>
Cc: linux-cifs@vger.kernel.org
Subject: Re: [PATCH v2] ksmbd: make utf-8 file name comparison work in __caseless_lookup()
Date: Wed, 28 Sep 2022 22:28:57 +0900	[thread overview]
Message-ID: <CAKYAXd9WFFv=ZqV+Jp3S1+OruWPFZrc9WeC1OWSqUYiOtYeZHg@mail.gmail.com> (raw)
In-Reply-To: <20220927215721.328425-1-atteh.mailbox@gmail.com>

2022-09-28 6:57 GMT+09:00, Atte Heikkilä <atteh.mailbox@gmail.com>:
> Case-insensitive file name lookups with __caseless_lookup() use
> strncasecmp() for file name comparison. strncasecmp() assumes an
> ISO8859-1-compatible encoding, which is not the case here as UTF-8
> is always used. As such, use of strncasecmp() here produces correct
> results only if both strings use characters in the ASCII range only.
> Fix this by using utf8_strncasecmp() if CONFIG_UNICODE is set. On
> failure or if CONFIG_UNICODE is not set, fallback to strncasecmp().
> Also, as we are adding an include for `linux/unicode.h', include it
> in `fs/ksmbd/connection.h' as well since it should be explicit there.
>
> Signed-off-by: Atte Heikkilä <atteh.mailbox@gmail.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>

Thanks for your work!

      reply	other threads:[~2022-09-28 13:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-27 21:57 [PATCH v2] ksmbd: make utf-8 file name comparison work in __caseless_lookup() Atte Heikkilä
2022-09-28 13:28 ` Namjae Jeon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKYAXd9WFFv=ZqV+Jp3S1+OruWPFZrc9WeC1OWSqUYiOtYeZHg@mail.gmail.com' \
    --to=linkinjeon@kernel.org \
    --cc=atteh.mailbox@gmail.com \
    --cc=linux-cifs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).