Andrew Tridgell tridge at
Tue Mar 31 00:00:24 GMT 1998

> Perhaps I'm splitting hairs but Jeremy warned me about playing around
> inside mangle.c.  I've written a new is_mangled function which is a bit
> more selective and doesn't use recursion.  The main behavioral change is
> that it tests the two characters following the magic character to see if 
> they are in the basechars set.

that sounds fine. Jeremy was probably worried about false negatives
(as I mentioned in the last email).

You should also try to make the function fast. Speed is more important
than removing every false positive, just think about how many weird
filenames it will actually hit that will fail the really simple
test. Then think about how often this code is called (on every
filename that comes from the client!).

Cheers, Andrew

More information about the samba-technical mailing list