1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-02 00:22:11 +03:00

s3/smbd: new "mangled names" setting "illegal"

This does mangling for names with illegal NTFS characters, but not for
names longer then 8.3:

Name mangling with mangled named = yes
======================================

Mangled | Short | Name
----------------------------
        |       | foo
        | yes   | 123456789
yes     |       | foo:bar

Name mangling with mangled named = illegal
==========================================

Mangled | Short | Name
----------------------------
        |       | foo
        |       | 123456789
yes     |       | foo:bar

Setting "mangled names = illegal" is the most sensible setting for
modern clients that don't use the shortname anymore.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Ralph Boehme
2016-11-17 14:24:07 +01:00
committed by Jeremy Allison
parent 19eae53773
commit 18591edafa
3 changed files with 21 additions and 2 deletions

View File

@ -1,5 +1,6 @@
<samba:parameter name="mangled names"
type="boolean"
type="enum"
enumlist="enum_mangled_names"
context="S"
parm="1"
xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
@ -11,6 +12,22 @@
<para>See the section on <smbconfoption name="name mangling"/> for
details on how to control the mangling process.</para>
<para>Possible option settings are</para>
<itemizedlist>
<listitem><para><emphasis>yes (default)</emphasis> -
enables name mangling for all not DOS 8.3 conforming
names.</para></listitem>
<listitem><para><emphasis>no</emphasis> - disables any
name mangling.</para></listitem>
<listitem><para><emphasis>illegal</emphasis> - does
mangling for names with illegal NTFS characters. This
is the most sensible setting for modern clients that
don't use the shortname anymore.</para></listitem>
</itemizedlist>
<para>If mangling is used then the mangling method is as follows:</para>
<itemizedlist>
@ -56,4 +73,5 @@
do not change between sessions.</para>
</description>
<value type="default">yes</value>
<value type="example">illegal</value>
</samba:parameter>

View File

@ -237,7 +237,7 @@ enum inheritowner_options {
};
/* mangled names options */
enum mangled_names_options {MANGLED_NAMES_NO, MANGLED_NAMES_YES};
enum mangled_names_options {MANGLED_NAMES_NO, MANGLED_NAMES_YES, MANGLED_NAMES_ILLEGAL};
/*
* Default passwd chat script.

View File

@ -319,6 +319,7 @@ static const struct enum_list enum_mangled_names[] = {
{MANGLED_NAMES_NO, "no"},
{MANGLED_NAMES_NO, "false"},
{MANGLED_NAMES_NO, "0"},
{MANGLED_NAMES_ILLEGAL, "illegal"},
{MANGLED_NAMES_YES, "yes"},
{MANGLED_NAMES_YES, "true"},
{MANGLED_NAMES_YES, "1"},