1 <samba:parameter xmlns:samba="http://samba.org/common">
2 <term><anchor id="MANGLEDNAMES"/>mangled names (S)</term>
3 <listitem><para>This controls whether non-DOS names under UNIX
4 should be mapped to DOS-compatible names ("mangled") and made visible,
5 or whether non-DOS names should simply be ignored.</para>
7 <para>See the section on <link linkend="NAMEMANGLINGSECT">
8 NAME MANGLING</link> for details on how to control the mangling process.</para>
10 <para>If mangling is used then the mangling algorithm is as follows:</para>
13 <listitem><para>The first (up to) five alphanumeric characters
14 before the rightmost dot of the filename are preserved, forced
15 to upper case, and appear as the first (up to) five characters
16 of the mangled name.</para></listitem>
18 <listitem><para>A tilde "~" is appended to the first part of the mangled
19 name, followed by a two-character unique sequence, based on the
20 original root name (i.e., the original filename minus its final
21 extension). The final extension is included in the hash calculation
22 only if it contains any upper case characters or is longer than three
25 <para>Note that the character to use may be specified using
26 the <link linkend="MANGLINGCHAR"><parameter moreinfo="none">mangling char</parameter>
27 </link> option, if you don't like '~'.</para></listitem>
29 <listitem><para>The first three alphanumeric characters of the final
30 extension are preserved, forced to upper case and appear as the
31 extension of the mangled name. The final extension is defined as that
32 part of the original filename after the rightmost dot. If there are no
33 dots in the filename, the mangled name will have no extension (except
34 in the case of "hidden files" - see below).</para></listitem>
36 <listitem><para>Files whose UNIX name begins with a dot will be
37 presented as DOS hidden files. The mangled name will be created as
38 for other filenames, but with the leading dot removed and "___" as
39 its extension regardless of actual original extension (that's three
40 underscores).</para></listitem>
43 <para>The two-digit hash value consists of upper case
44 alphanumeric characters.</para>
46 <para>This algorithm can cause name collisions only if files
47 in a directory share the same first five alphanumeric characters.
48 The probability of such a clash is 1/1300.</para>
50 <para>The name mangling (if enabled) allows a file to be
51 copied between UNIX directories from Windows/DOS while retaining
52 the long UNIX filename. UNIX files can be renamed to a new extension
53 from Windows/DOS and will retain the same basename. Mangled names
54 do not change between sessions.</para>
56 <para>Default: <command moreinfo="none">mangled names = yes</command></para>