The branch, v3-2-test has been updated
       via  120048d2f40cf1a0ace2ecde205cbc694d263d69 (commit)
      from  2fe111c19bc827ec132365e718a2136bda57e568 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit 120048d2f40cf1a0ace2ecde205cbc694d263d69
Author: Jeremy Allison <[EMAIL PROTECTED]>
Date:   Sat Dec 22 17:38:18 2007 -0800

    If we detect a case insensitive filesystem make
    sure we don't search directories on name misses
    for non-mangled names.
    Jeremy

-----------------------------------------------------------------------

Summary of changes:
 source/smbd/filename.c |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/smbd/filename.c b/source/smbd/filename.c
index f0d036b..5ae193f 100644
--- a/source/smbd/filename.c
+++ b/source/smbd/filename.c
@@ -222,8 +222,14 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx,
 
        start = name;
 
-       if(!conn->case_sensitive
-          && stat_cache_lookup(conn, &name, &dirpath, &start, &st)) {
+       /* If we're providing case insentive semantics or
+        * the underlying filesystem is case insensitive,
+        * then a case-normalized hit in the stat-cache is
+        * authoratitive. JRA.
+        */
+
+       if((!conn->case_sensitive || !(conn->fs_capabilities & 
FILE_CASE_SENSITIVE_SEARCH)) &&
+                       stat_cache_lookup(conn, &name, &dirpath, &start, &st)) {
                *pst = st;
                goto done;
        }
@@ -269,10 +275,11 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx,
 
        /*
         * A special case - if we don't have any mangling chars and are case
-        * sensitive then searching won't help.
+        * sensitive or the underlying filesystem is case insentive then 
searching
+        * won't help.
         */
 
-       if (conn->case_sensitive &&
+       if ((conn->case_sensitive || !(conn->fs_capabilities & 
FILE_CASE_SENSITIVE_SEARCH)) &&
                        !mangle_is_mangled(name, conn->params)) {
                goto done;
        }


-- 
Samba Shared Repository

Reply via email to