summaryrefslogtreecommitdiffstats
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-11-28 20:14:07 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:05:38 -0500
commitdefe1f3aa8ada898b158836993d8dc98c7cc3b76 (patch)
tree953e23cdcebbd53cae9fc88b8373940e9ebce596 /source3
parente5b9a027ff860fd5f34cf91acd14a43f3d6dfbce (diff)
downloadsamba-defe1f3aa8ada898b158836993d8dc98c7cc3b76.tar.gz
samba-defe1f3aa8ada898b158836993d8dc98c7cc3b76.tar.xz
samba-defe1f3aa8ada898b158836993d8dc98c7cc3b76.zip
r11945: Make us follow the newly documented pathname processing rules:
"As a special case for directories with large numbers of files, if the case options are set as follows, "case sensitive = yes", "case preserve = no", "short preserve case = no" then the "default case" option will be applied and will modify all filenames sent from the client when accessing this share." This is needed as fixing the case preserve rules to only apply to new filenames broke the large directory fix. Glad we caught this before release. Thanks to jht for this one. Jeremy. (This used to be commit abc21cc7322d695cf77b6fb18f4ecdb16288c19b)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/filename.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index 2ee8ba1e4f..6c0f8b7758 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -150,6 +150,19 @@ BOOL unix_convert(pstring name,connection_struct *conn,char *saved_last_componen
pstrcpy(saved_last_component, name);
}
+ /*
+ * Large directory fix normalization. If we're case sensitive, and
+ * the case preserving parameters are set to "no", normalize the case of
+ * the incoming filename from the client WHETHER IT EXISTS OR NOT !
+ * This is in conflict with the current (3.0.20) man page, but is
+ * what people expect from the "large directory howto". I'll update
+ * the man page. Thanks to jht@samba.org for finding this. JRA.
+ */
+
+ if (conn->case_sensitive && !conn->case_preserve && !conn->short_case_preserve) {
+ strnorm(name, lp_defaultcase(SNUM(conn)));
+ }
+
start = name;
pstrcpy(orig_path, name);