Bug 10139 - valid utf8 filenames cause "invalid conversion error" messages.
valid utf8 filenames cause "invalid conversion error" messages.
Status: RESOLVED FIXED
Product: Samba 4.0
Classification: Unclassified
Component: File services
unspecified
All All
: P5 normal
: ---
Assigned To: Karolin Seeger
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-12 20:16 UTC by Jeremy Allison
Modified: 2013-10-02 07:26 UTC (History)
1 user (show)

See Also:


Attachments
git-am fix for 4.1.0 and 4.0.x (1.65 KB, patch)
2013-09-12 20:39 UTC, Jeremy Allison
vl: review+
Details
git-am fix for 3.6.x. (1.35 KB, patch)
2013-09-12 21:42 UTC, Jeremy Allison
vl: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Allison 2013-09-12 20:16:54 UTC
Braindead code inside is_legal_name() in source3/smbd/mangle_hash2.c does a call to convert_string() with a source length hardcoded as 2. This leads to "invalid conversion error" messages in the log for any utf8 filenames that contain utf8 encodings longer than 2.

Correct code should use next_codepoint().

Patches for 4.1.0, 4.0.x, 3.6.x to follow.

Jeremy.
Comment 1 Jeremy Allison 2013-09-12 20:39:55 UTC
Created attachment 9211 [details]
git-am fix for 4.1.0 and 4.0.x

Fix that went into master. Can be cherry-picked as:

git cherry-pick -x 776db7d38597a29536e4127837ffa3b4f4ce35ab
Comment 2 Jeremy Allison 2013-09-12 21:42:22 UTC
Created attachment 9212 [details]
git-am fix for 3.6.x.

Same fix back-ported to 3.6.x.

Jeremy.
Comment 3 Jeremy Allison 2013-09-18 20:19:14 UTC
Re-assigning to Karolin for inclusion in 3.6.next, 4.0.next, 4.1.0.

Jeremy.
Comment 4 Karolin Seeger 2013-09-19 08:07:21 UTC
(In reply to comment #1)
> Created attachment 9211 [details]
> git-am fix for 4.1.0 and 4.0.x
> 
> Fix that went into master. Can be cherry-picked as:
> 
> git cherry-pick -x 776db7d38597a29536e4127837ffa3b4f4ce35ab

Pushed to autobuild-v4-1-test and autobuild-v4-0-test.
Gnaa, forgot to cherry-pick, sorry.
Comment 5 Karolin Seeger 2013-09-19 08:09:52 UTC
(In reply to comment #4)
> (In reply to comment #1)
> > Created attachment 9211 [details] [details]
> > git-am fix for 4.1.0 and 4.0.x
> > 
> > Fix that went into master. Can be cherry-picked as:
> > 
> > git cherry-pick -x 776db7d38597a29536e4127837ffa3b4f4ce35ab
> 
> Pushed to autobuild-v4-1-test and autobuild-v4-0-test.
> Gnaa, forgot to cherry-pick, sorry.

Pushed with cherry-pick information.
Comment 6 Karolin Seeger 2013-09-19 08:12:26 UTC
(In reply to comment #2)
> Created attachment 9212 [details]
> git-am fix for 3.6.x.
> 
> Same fix back-ported to 3.6.x.
> 
> Jeremy.

Jeremy, is this a cosmetical fix or a severe bug?
v3-6-test has been frozen yesterday (and tarball has been created).
Comment 7 Karolin Seeger 2013-09-19 10:07:52 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #1)
> > > Created attachment 9211 [details] [details] [details]
> > > git-am fix for 4.1.0 and 4.0.x
> > > 
> > > Fix that went into master. Can be cherry-picked as:
> > > 
> > > git cherry-pick -x 776db7d38597a29536e4127837ffa3b4f4ce35ab
> > 
> > Pushed to autobuild-v4-1-test and autobuild-v4-0-test.
> > Gnaa, forgot to cherry-pick, sorry.
> 
> Pushed with cherry-pick information.

Pushed to v4-1-test and v4-0-test.
Comment 8 Jeremy Allison 2013-09-19 16:03:51 UTC
It's a cosmetic fix - it can wait until the next 3.6.x release.

Thanks !

Jeremy.
Comment 9 Karolin Seeger 2013-09-20 07:08:50 UTC
(In reply to comment #8)
> It's a cosmetic fix - it can wait until the next 3.6.x release.
> 
> Thanks !
> 
> Jeremy.

Depending on how things go on with the 4.1.0 release, 3.6.19 will probably be the last maintenance release. Add it?
Comment 10 Jeremy Allison 2013-09-21 00:34:58 UTC
Only if we do another 3.6.x release, otherwise it's not worth it.

Thanks !

Jeremy.
Comment 11 Karolin Seeger 2013-09-23 07:17:03 UTC
(In reply to comment #10)
> Only if we do another 3.6.x release, otherwise it's not worth it.
> 
> Thanks !
> 
> Jeremy.

Ok, thanks, Jeremy.
Comment 12 Karolin Seeger 2013-10-02 07:26:24 UTC
(In reply to comment #10)
> Only if we do another 3.6.x release, otherwise it's not worth it.
> 
> Thanks !
> 
> Jeremy.

Pushed to v3-6-test as we are going to ship another maintenance release.
Will be included in Samba 3.6.20.
Closing out bug report.