Wildcard handling

Andrew Tridgell tridge at samba.org
Tue Feb 13 06:29:28 GMT 2001


>  The '?' code contains an ugly hack
> using get_remote_arch() to determine what semantics to implement.
> If anyone can think of a cleaner way to implement this, please
> let me know.

This is the bit I'm most concerned about. In the past whenever we have
thought that NT makes decisions based on a guess of the remote client
type we have eventually found that we were wrong, and we were missing
some factor.

I'd be far more comfortable with changing Samba behaviour based on
whether "nt smb support" is set. When it is not set then we are
supposed to be masquerading as a non-NT server and it may be that
clients expect different results in that case. 

Any test where we used the guessed client type I think pretty much
must be wrong, and will allsmot certainly lead us back into the old
spiral of fixing the behaviour of individual test cases (which always
ends up breaking other test cases). 

One big advantage of a test based on whether "nt smb support" is set
is that we will know for certain that we are not screwing up something
else if that setting is not made. Any change to the wildcard code
based on client type will not give us that guarantee.

> According to section 3.4 of the expired CIFS spec...

The CIFS spec is a complete fantasy when it comes to wildcard
matching. It was some writers idea of how things are supposed to work
and it is easy to show that the person who wrote it didn't have a
clue.

> Andrew, Can you comment on this?

my principal comment is that the trick to solving these issues is to
determine whether the difference in behaviour is caused by differing
client expectations depending on something we are returning
(ie. whether we set the nt smb support bit) or whether it is caused by
the client calling different SMB calls and us failing to properly
implement those different calls. 

One way to determine this is to use smbfilter. That allows you to run
between a win9X client and a NT server but with the traffic altered so
that the nt server reports no nt smb support. I'll give that a go this
afternoon.

Cheers, Tridge




More information about the samba-technical mailing list