Wildcard handling

Andrew Tridgell tridge at samba.org
Wed Feb 14 06:46:17 GMT 2001


Gerald,

I've now proven that NT does select wildcard behaviour based on the
protocol dialect that is negotiated. What is more interesting is that
the behaviour of all the wildcard functions (including the NT specific
findfirst requests) changes, not just the functions that are legal
with the lower protocol level.

To demonstrate this I modified smbclient to use SMBsearch and to
not negotiate above LANMAN1 protocol level. When connecting to NT the
mask ?.??? matched the filename "x". Changing to LANMAN1 with
NT_FINDFIRST gave the same result. Changing to SMBsearch or
NT_FINDFIRST with the NT1 protocol level changes the result so that
"x" does not match "?.???".

This means that NT must select a different set of internal wildcard
matching routines when a client negotiates a lower protocol level. I
think we will need to do the same thing to be compatible.

The hard bit will be writing the new fnmatch() function to cover this
case. Luckily masktest will make it easy to test.

Cheers, Tridge




More information about the samba-technical mailing list