Bug 3666 - Name mangling incorrect
Summary: Name mangling incorrect
Status: RESOLVED WONTFIX
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Docs (show other bugs)
Version: 3.0.21c
Hardware: x86 Linux
: P5 minor
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-07 19:13 UTC by Shammah Chancellor (dead mail address)
Modified: 2020-12-29 21:20 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shammah Chancellor (dead mail address) 2006-04-07 19:13:45 UTC
Short Names are mangled incorrectly.  According to the docs I've read the convention is five letters of the file name and a tilde and then two letters from a hash of the entire file name, then a period and the extension.

Here's an example of what's occuring:

01/17/2006  01:16 PM    <DIR>          CRT6BY~Q     Conferences
10/04/2005  03:38 PM    <DIR>          CF0BW7~R     Committees
01/11/2006  02:49 AM    <DIR>          P5UBMN~9     PastPerformance
04/07/2006  03:20 PM    <DIR>          LNLYW2~O     LabRawData

From the looks of it, the entire thing seems to end up a hash of the file name.  This makes it so it's exteremely hard for users to find their files when using older software with mapped network drives.
Comment 1 Jeremy Allison 2006-04-07 19:34:02 UTC
The default name mangling algorithm Samba uses changed. There are several things you can change to make the mangling look more like Windows. Look into the 
"mangle prefix" option, plus you can change the mangling back to the old algorithm by setting "mangling method = hash" instead of the default "mangling method = hash2"
This is really a docs bug, not a code bug.
Jeremy.
Comment 2 Shammah Chancellor (dead mail address) 2006-04-10 09:42:16 UTC
I feel this is a bug as the name is now just a hash by default.  Having a default value of 1 letter preserved is rather silly.  Also, the Tilde no longer separates the hash from the preserved characters.
Comment 3 Jeremy Allison 2006-04-10 10:45:00 UTC
As mentioned, it's a docs bug not a code bug. It's working as designed.
Jeremy.
Comment 4 Shammah Chancellor (dead mail address) 2006-04-10 10:54:48 UTC
Designs can have bugs also, this is a design bug.  The default should NOT be 1 letter of prefix as the purpose of a short file name is to provide compatibility to old software which requires 8.3 filenames while still allowing users to locate their files.  Yes, from your programmer's perspective it might be perfectly reasonable to have the entire 8.3 filename as a hash to prevent collision, it is, however, at odds with nessesity.

For example, none of the users of our samba server could locate any of their directories when using FoxPro 2.6 and the new default hashing mechanism.  What is the point of the default, if it is always required to be changed in order to provide usefullness?