svn commit: samba r11347 - in trunk/source/smbd: .

jra at samba.org jra at samba.org
Fri Oct 28 01:42:22 GMT 2005


Author: jra
Date: 2005-10-28 01:42:20 +0000 (Fri, 28 Oct 2005)
New Revision: 11347

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=11347

Log:
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.

Modified:
   trunk/source/smbd/filename.c


Changeset:
Modified: trunk/source/smbd/filename.c
===================================================================
--- trunk/source/smbd/filename.c	2005-10-28 01:42:03 UTC (rev 11346)
+++ trunk/source/smbd/filename.c	2005-10-28 01:42:20 UTC (rev 11347)
@@ -445,9 +445,18 @@
 	 * 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))) {



More information about the samba-cvs mailing list