Bug 195 - mangling method = hash cant work against multibyte strings
Summary: mangling method = hash cant work against multibyte strings
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Extended Characters (show other bugs)
Version: 3.0.0preX
Hardware: All All
: P2 minor
Target Milestone: 3.0.0rc2
Assignee: Jeremy Allison
QA Contact:
Depends on:
Reported: 2003-06-28 10:14 UTC by TAKAHASHI Motonobu
Modified: 2005-11-14 09:29 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description TAKAHASHI Motonobu 2003-06-28 10:14:56 UTC

    mangling method = hash
    unix charset = CP932 (or EUC-JP)
    writeable = yes

In addition to BUG#190, I found "mangling method = hash" has another
problems to treat multibyte strings.

I will show some samples:
(*) <A> means a Japanese hiragana character (U+3042).

1. a mangled name does not create against a filename more than 8 bytes:

Samba 3.0.0beta1: mangling method = hash, unix charset = EUC-JP
2003/06/26  14:22                    7                 <A><A><A><A><A><A>

Problem1: The length of <A><A><A><A><A><A> is 12byte, but no mangled
name is created. In Samba 2.2.x, a mangled name is created.

This is because "mangling method = hash" in Samba 3.0.0 checks the
number of characters of the string but should check if the byte length
of the string is more than 8 bytes or not.

If we create a file whose name is <A><A><A><A><A><A><A><A><A> ( more
than 9 multibyte chars), then smbd fails in convert_string_allocate()
and calls smb_panic().
Comment 1 Gerald (Jerry) Carter (dead mail address) 2003-07-15 09:35:08 UTC
moving to extended character component
Comment 2 Alexander Bokovoy 2003-07-15 11:03:08 UTC
Accept bug and reassign to me.
Comment 3 Gerald (Jerry) Carter (dead mail address) 2003-08-28 09:33:12 UTC
Might be fixed with jeremy's other changes.  Pleas 
retest (see bug 186)
Comment 4 Gerald (Jerry) Carter (dead mail address) 2003-08-29 08:00:34 UTC
I'm marking this as fixed in hopes that all of the mutibyte
character set work that was done for RC2 does resolve the 
problem.  If not, please reopen the bug
Comment 5 Gerald (Jerry) Carter (dead mail address) 2005-02-07 08:38:56 UTC
originally reported against 3.0.0beta1.  CLeaning out 
non-production release versions.
Comment 6 Gerald (Jerry) Carter (dead mail address) 2005-08-24 10:25:20 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.
Comment 7 Gerald (Jerry) Carter (dead mail address) 2005-11-14 09:29:08 UTC
database cleanup