Samba 3.0.20 - findfirst optimization
Jeremy Allison
jra at samba.org
Sun Oct 30 18:21:32 GMT 2005
On Sun, Oct 30, 2005 at 01:41:31PM +0200, Dina Fine wrote:
> Still FindFirst on mangled names doesn't work well both in case
> sensitive = yes and case sensitive = no.
> If the mangled name (as in the example below) is test<>.txt and you have
> also test().txt in the same directory,
> _unix_convert converts the name TKEIRY~Z.TXT to test<>.txt but
> mask_match() (called from get_lanman2_entry) returns true for test<>.txt
> and test().txt (due to <> chars in test<>.txt name)
>
> S:\>dir shlomi\
> > Volume in drive S is c$
> > Volume Serial Number is 2629-002B
> >
> > Directory of S:\shlomi
> >
> > 10/26/2005 09:04 AM <DIR> .
> > 10/26/2005 09:21 AM <DIR> ..
> > 10/26/2005 09:03 AM 5 test().txt
> > 10/26/2005 09:04 AM 5 TKEIRY~Z.TXT
> > 10/26/2005 09:03 AM 6 hello.txt
>
> So when findfirst requests for TKEIRY~Z.TXT, samba returns two files:
> test().txt and test<>.txt which is not good.
> Tcpdump:
> Transaction2 request FIND_FIRST2, Pattern: \TKEIRY~Z.TXT
> Transaction2 response FIND_FIRST2, Files: test().txt TKEIRY~Z.TXT
I'll take a look at this - might be confusing the <> characters
in the name with wildcards (<> are valid windows wildcard characters).
Jeremy.
More information about the samba-technical
mailing list