[SCM] Samba Shared Repository - branch master updated - 93fd28a350c1f2652a24daead8ca6e4c8ff696cb

Jeremy Allison jra at samba.org
Tue Nov 18 18:59:02 GMT 2008


The branch, master has been updated
       via  93fd28a350c1f2652a24daead8ca6e4c8ff696cb (commit)
      from  6ce29dc9add1252b0ded9d2c1c2b6bae74604cc4 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 93fd28a350c1f2652a24daead8ca6e4c8ff696cb
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Nov 18 10:57:54 2008 -0800

    Re-structure Volker's patch to "Fix trans2findfirst for the large directory optimization". Makes the change clearer.
    Jeremy.

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

Summary of changes:
 source3/smbd/filename.c |   47 +++++++++++++++++++++--------------------------
 1 files changed, 21 insertions(+), 26 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index 3eb2d63..392264b 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -194,30 +194,39 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx,
 		return result;
 	}
 
+	if (!(name = talloc_strdup(ctx, orig_path))) {
+		DEBUG(0, ("talloc_strdup failed\n"));
+		return NT_STATUS_NO_MEMORY;
+	}
+
+	/*
+	 * 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 at samba.org for finding this. JRA.
+	 */
+
+	if (conn->case_sensitive && !conn->case_preserve &&
+			!conn->short_case_preserve) {
+		strnorm(name, lp_defaultcase(SNUM(conn)));
+	}
+
 	/*
 	 * Ensure saved_last_component is valid even if file exists.
 	 */
 
 	if(pp_saved_last_component) {
-		end = strrchr_m(orig_path, '/');
+		end = strrchr_m(name, '/');
 		if (end) {
 			*pp_saved_last_component = talloc_strdup(ctx, end + 1);
 		} else {
 			*pp_saved_last_component = talloc_strdup(ctx,
-							orig_path);
-		}
-		if (conn->case_sensitive && !conn->case_preserve &&
-		    !conn->short_case_preserve) {
-			strnorm(*pp_saved_last_component,
-				lp_defaultcase(SNUM(conn)));
+							name);
 		}
 	}
 
-	if (!(name = talloc_strdup(ctx, orig_path))) {
-		DEBUG(0, ("talloc_strdup failed\n"));
-		return NT_STATUS_NO_MEMORY;
-	}
-
 	if (!lp_posix_pathnames()) {
 		stream = strchr_m(name, ':');
 
@@ -232,20 +241,6 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx,
 		}
 	}
 
-	/*
-	 * 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 at 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;
 
 	/* If we're providing case insentive semantics or


-- 
Samba Shared Repository


More information about the samba-cvs mailing list