summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-10-28 01:42:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:05:13 -0500
commitf9b750542933cb60eca7da335193c36361496622 (patch)
tree9944ddebd665a38dc8d86a3c766ce75572648ad8
parentc0dad16e0ff95a800dfbe11ca3c6303d882687a9 (diff)
downloadsamba-f9b750542933cb60eca7da335193c36361496622.tar.gz
samba-f9b750542933cb60eca7da335193c36361496622.tar.bz2
samba-f9b750542933cb60eca7da335193c36361496622.zip
r11346: Fix for bug found by Dina Fine. If in case sensitive mode then
the mangle cache is no good (3 letter extension could be wrong case - so don't demangle in this case - leave as mangled and allow the mangling of the directory entry read (which is done case insensitively) to match instead. This will lead to more false positive matches but we fail completely without it. Jeremy. (This used to be commit 238b35d2e6e21d0e07d500d446f08ec128ea7720)
-rw-r--r--source3/smbd/filename.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index f0a33e568e..b389b9c1ae 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -445,9 +445,18 @@ static BOOL scan_directory(connection_struct *conn, const char *path, char *name
* read from the directory and then mangled by the mangle_map()
* call. We need to mangle both names or neither.
* (JRA).
+ *
+ * Fix for bug found by Dina Fine. If in case sensitive mode then
+ * the mangle cache is no good (3 letter extension could be wrong
+ * case - so don't demangle in this case - leave as mangled and
+ * allow the mangling of the directory entry read (which is done
+ * case insensitively) to match instead. This will lead to more
+ * false positive matches but we fail completely without it. JRA.
*/
- if (mangled)
+
+ if (mangled && !conn->case_sensitive) {
mangled = !mangle_check_cache( name, maxlength, SNUM(conn));
+ }
/* open the directory */
if (!(cur_dir = OpenDir(conn, path, NULL, 0))) {