The branch, v3-4-test has been updated
       via  ed6388ee3a96972b7bf7df79c9ca0b63bfb84380 (commit)
      from  130baafc7c36333cf29a19921f4736beb53a15e9 (commit)

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


- Log -----------------------------------------------------------------
commit ed6388ee3a96972b7bf7df79c9ca0b63bfb84380
Author: Tim Prouty <[email protected]>
Date:   Tue Apr 7 00:56:50 2009 +0000

    s3 onefs: Fix case-insensitivity for mangled names
    
    onefs_get_real_filename needs to demangle the filename before doing
    the case-insensitive estat
    (cherry picked from commit 161bd7f78fd10e4f850dc3ef1ba3df53c43eae30)

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

Summary of changes:
 source3/modules/vfs_onefs.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_onefs.c b/source3/modules/vfs_onefs.c
index ad59c2b..e4a0feb 100644
--- a/source3/modules/vfs_onefs.c
+++ b/source3/modules/vfs_onefs.c
@@ -153,10 +153,21 @@ static int onefs_get_real_filename(vfs_handle_struct 
*handle, const char *path,
                                   char **found_name)
 {
        SMB_STRUCT_STAT sb;
+       struct connection_struct *conn = handle->conn;
        struct stat_extra se;
        int result;
+       char *unmangled_name = NULL;
        char *full_name = NULL;
 
+       /* First demangle the name if necessary. */
+       if (!conn->case_sensitive && mangle_is_mangled(name, conn->params) &&
+           mangle_lookup_name_from_8_3(mem_ctx, name, &unmangled_name,
+                                       conn->params)) {
+               /* Name is now unmangled. */
+               name = unmangled_name;
+       }
+
+       /* Do the case insensitive stat. */
        ZERO_STRUCT(se);
        se.se_version = ESTAT_CURRENT_VERSION;
        se.se_flags = ESTAT_CASE_INSENSITIVE | ESTAT_SYMLINK_NOFOLLOW;
@@ -184,6 +195,7 @@ static int onefs_get_real_filename(vfs_handle_struct 
*handle, const char *path,
 
 done:
        TALLOC_FREE(full_name);
+       TALLOC_FREE(unmangled_name);
        return result;
 }
 


-- 
Samba Shared Repository

Reply via email to