Samba not handling sharename folding to uppercase for some charsets?

Jeremy Allison jra at samba.org
Fri Mar 12 11:04:25 MST 2010


On Thu, Mar 11, 2010 at 04:02:55PM -0800, Richard Sharpe wrote:
> Hi,
> 
> We have just experienced something weird and I wanted to see if this
> is known or if there is a way around it.
> 
> We were testing share names containing non-ASCII chars (French u-grave
> or something). We could see the correct characters being sent back in
> a NetShareEnum, and the Windows Client first tried to get an MSDFS
> referral, which we refused (NOT IMPLEMENTED). Then the client tried a
> TreeConnect&X with the uppercase version of the share name, which we
> refused because it did not match what we knew.
> 
> If we use the upper-case version of the share name, all is fine,
> although the Mac SMB client does not case fold share names before
> sending them over, so this is hardly a solution.
> 
> I have tracked the problem down to strlower_m in
> source3/lib/util_str.c which explicitly says that it is optimized for
> ASCII. In making a connection Samba 3 converts the share name to
> 'lower case' using strlower_m and it seems that the possibility that
> characters above 128 might need conversion.

I don't understand what you're asking here.

Both strlower_m and strupper_m optimize for pure ASCII
(characters in the range 1-127), and use asii case folding
for them.

If there are any characters not in this range, then the
fast-path conversion is aborted and goes through convert_string_talloc()
which uses iconv.

What is failing ? French u-grave are in the range 127-255, so
the iconv conversion should work fine.

Even if the client sends a non-canonicalized share name,
the strequal code should be able to match any version of
the non-canonicalized names.

Need more info I think Richard.

Jeremy


More information about the samba-technical mailing list