From: Volker Lendecke Date: Tue, 18 Nov 2008 16:03:38 +0000 (+0100) Subject: Fix trans2findfirst for the large directory optimization X-Git-Tag: samba-4.0.0alpha6~480^2~191 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6ce29dc9add1252b0ded9d2c1c2b6bae74604cc4;p=thirdparty%2Fsamba.git Fix trans2findfirst for the large directory optimization With case sensitive = yes preserve case = no short preserve case = no default case = upper a "dir FOO.txt" would not find "FOO.TXT" because FOO.txt ends up unconverted in the mask for mask_match. Jeremy, please check! Volker --- diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index 562f1e8d943..3eb2d63734a 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -206,6 +206,11 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx, *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))); + } } if (!(name = talloc_strdup(ctx, orig_path))) {