Bug 11255 - Handling of trailing period and trailing space in vfs_fruit or smbd
Summary: Handling of trailing period and trailing space in vfs_fruit or smbd
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Ralph Böhme
QA Contact: Samba QA Contact
: 11965 (view as bug list)
Depends on:
Blocks: 3792 4317 7001 10491
  Show dependency treegraph
Reported: 2015-05-05 12:41 UTC by Ralph Böhme
Modified: 2020-07-16 11:43 UTC (History)
7 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Böhme 2015-05-05 12:41:53 UTC
vfs_fruit must handle trailing period and space mapping to and from Unicode private range, because the OS X client will always map them. See bug #11207.
Comment 1 Björn Jacke 2017-11-06 22:58:35 UTC
*** Bug 11965 has been marked as a duplicate of this bug. ***
Comment 2 Björn Jacke 2017-11-06 23:08:30 UTC
I think we should consider to map trailing period and tailing space unconditionally in smbd.

Linux cifs vfs maps them the same way as OS X clients since d2809afc253bf6c90e15.

Windows clients would at least be able to read the files with trailing period and tailing space (which would just stay private unicode glyphs there accordingly).
Comment 3 Jeremy Allison 2017-11-06 23:12:20 UTC
Can you explain exactly what you're proposing ? In terms of incoming encodings -> smbd transformation -> disk storage and then disk storage -> smbd tranformation -> outgoing encoding ?
Comment 4 Björn Jacke 2017-11-06 23:32:16 UTC
I mean always map tailing space (0x20) on local disc to 0xF028 on the wire and local trailing period (0x2E) to 0xF029 on the wire.
Comment 5 Björn Jacke 2017-11-06 23:36:07 UTC
b704e70b7cf48f9b67c07d585168e102dfa30bb4 is the correct git hash for the change in cifs vfs
Comment 6 Björn Jacke 2017-11-06 23:41:55 UTC
... and the always apply the reverse mapping from wire encoding to local "encoding"
Comment 7 Ralph Böhme 2017-11-07 12:02:51 UTC

Instead of name mangling trailing '.' and ' ' (dot and space) we should map those characters to the Unicode private range.

The following vfs_catia config illustrates this:

    vfs objects = catia
    catia:mappings = 0x20:0xf028,0x2e:0xf029

But we need this in the path translation and mapping subsystems.
Comment 8 Ryan Launchbury 2020-03-04 11:20:37 UTC
Hi all,

We still see this issue in the 4.10 branch; whereby an OS X client cannot see a folder that ends in a trailing space. Using 'catia:mappings = 0x20:0xf028,0x2e:0xf029' shows the folder and allows it's contents to be removed, however the folder results in an error -8003.

Could you advise what the current recommendations around this are?

Unfortunately preventing the creation of these files is not possible, as they are being recovered from long term backups, and already have these invalid file names.