From 18591edafad17172502cc9b831d58d27f9076bbc Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Thu, 17 Nov 2016 14:24:07 +0100 Subject: [PATCH] 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 Reviewed-by: Jeremy Allison --- docs-xml/smbdotconf/filename/manglednames.xml | 20 ++++++++++++++++++- lib/param/loadparm.h | 2 +- lib/param/param_table.c | 1 + 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/docs-xml/smbdotconf/filename/manglednames.xml b/docs-xml/smbdotconf/filename/manglednames.xml index bd5d97f5e8a..972834e561a 100644 --- a/docs-xml/smbdotconf/filename/manglednames.xml +++ b/docs-xml/smbdotconf/filename/manglednames.xml @@ -1,5 +1,6 @@ @@ -11,6 +12,22 @@ See the section on for details on how to control the mangling process. + Possible option settings are + + + yes (default) - + enables name mangling for all not DOS 8.3 conforming + names. + + no - disables any + name mangling. + + illegal - does + mangling for names with illegal NTFS characters. This + is the most sensible setting for modern clients that + don't use the shortname anymore. + + If mangling is used then the mangling method is as follows: @@ -56,4 +73,5 @@ do not change between sessions. yes +illegal diff --git a/lib/param/loadparm.h b/lib/param/loadparm.h index 2cd5ccac1c2..6d01b37f764 100644 --- a/lib/param/loadparm.h +++ b/lib/param/loadparm.h @@ -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. diff --git a/lib/param/param_table.c b/lib/param/param_table.c index 8eb791aa2c4..95c3b8c6188 100644 --- a/lib/param/param_table.c +++ b/lib/param/param_table.c @@ -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"},