[PATCH] s3:loadparm: Ensure to truncate FS Volume Label at multibyte boundary

Shyam Rathi shyam.rathi at nutanix.com
Thu May 16 18:01:07 UTC 2019


Thank you Jeremy and Andreas for the quick review.


Regards,
-Shyam

From: Andreas Schneider <asn at samba.org>
Date: Thursday, May 16, 2019 at 1:56 AM
To: Jeremy Allison <jra at samba.org>
Cc: Shyam Rathi <shyam.rathi at nutanix.com>, "samba-technical at lists.samba.org" <samba-technical at lists.samba.org>, "slow at samba.org" <slow at samba.org>, "ddiss at samba.org" <ddiss at samba.org>
Subject: Re: [PATCH] s3:loadparm: Ensure to truncate FS Volume Label at multibyte boundary

On Wednesday, May 15, 2019 10:58:41 PM CEST Jeremy Allison wrote:
On Tue, May 14, 2019 at 06:26:07PM +0000, Shyam Rathi via samba-technical
wrote:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__bugzilla.samba.org_show-5Fbug.cgi-3Fid-3D13947&d=DwIFaQ&c=s883GpUCOChKOHiocYtGcg&r=01xcNiYQJzRsQpoTRuxjGKbHz89cfrrcU79qoxdog2k&m=-R97H_0K89gUE-OWcunaNHbWo1uhOTlvPHD3E1MJKUc&s=ZSCOUQOtGTSyF4QDaX2zNwGC8zaql5BJXmfJQLwfsGo&e=
>
> To reproduce, create a share with a name where 32nd byte is not the first
byte of a mutlibyte character. Using CJK characters (3 bytes each) is a
possible approach. For example, creating a share with name 에이에프에스삼점오생성 and
trying to open a txt file in Notepad gives the following error:
>   Invalid character. For multibyte character sets, only the leading byte
>   is
>   included without the trailing byte. For Unicode character sets, include
>   the characters 0xFFFF and 0xFFFE.
>
> Looking at wireshark capture, the following is seen as source of this
issue:
>   GetInfo Request FS_INFO/FileFsVolumeInformation File: Rathi9\???????????
>   GetInfo Response, Error: STATUS_ILLEGAL_CHARACTER
>
> Proposed solution is to truncate the label name at the end of a multibyte
> character before the 32nd byte.
>
> Please review and suggest changes, improvements and other approaches.
>
> Regards,
> -Shyamsunder Rathi (mailto:shyam.rathi at nutanix.com)
A few slight changes to make things clearer (to me at least :-).
Changes attached and bug ID added to the commit message. Let me
know if you're OK with it.
RB+. Can I get a second Team reviewer ?

RB+ and pushed to autobuild.

--
Andreas Schneider                      asn at samba.org<mailto:asn at samba.org>
Samba Team                             www.samba.org
GPG-ID:     8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D





More information about the samba-technical mailing list