man smb.conf (entry "mangled names") says "The first three alphanumeric characters of the final extension are preserved, forced to upper case and appear as the extension of the mangled name. The final extension is defined as that part of the original filename after the rightmost dot." Samba 3.0.7, at least with hash2 mangling, does not implement this -- so any mangled *.flac files on a Linux server, such as "Foo?.flac" appear extensionless on a Windows 2000 client, rather than as the still-usable "*.FLA". The problem is in name_map() in mangle_hash2.c, where the variable 'dot_p' is used both to delimit the extension and to record whether the extension is already 3-char-ASCII-kosher. In particular, on line 569 it tries to use dot_p to mangle a non-kosher extension, but in the non-kosher case dot_p will already have been zeroed by line 537 or 541. A fix would be to invent a new variable "should_mangle_whole_name" (or some pithier term), clear it by default, set it on lines 537 and 541, and test on it (rather than dot_p) at line 560.
Still not fixed at Samba 3.0.10 against Windows XP client. (this does not depend on client OSes.) For example: ----- S:\Work\Samba\SFN>echo test > a.aaaa S:\Work\Samba\SFN>dir /x a.aaaa 2004/12/26 15:52 7 ALAG78~8 a.aaaa ----- The extesion of the file should be "aaa."
updated smb.conf(5). Removed offending section.
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.
Still not fix at Samba 3.0.24 & Samba 3.2.4.