mangling char ignored in mangle_hash2.c ...
abartlet at samba.org
Sat Aug 31 21:34:00 GMT 2002
Richard Sharpe wrote:
> On Sun, 1 Sep 2002, Andrew Bartlett wrote:
> > Richard Sharpe wrote:
> > >
> > > Hi,
> > >
> > > Having looked at mangle_hash2, it is clear that the mangling char is hard
> > > coded. I am sure this is not intended.
> > >
> > > Should I fix it?
> > While tridge would be a much better one to comment, I will say this:
> > The new mangling scheme was designed to be very fast, and not
> > particulary flexible. In fact, it could be argued that the inflexibilty
> > is a feature - becouse changes to the mangling scheme actually have some
> > nasty consequenses. (8.3 names are stored by some applications etc,
> > hence why we have not moved to hash2 in 2.2 by default)
> Oh, I agree with that, however, hard-coding ~ when lp_mangling_char()
> would be almost as fast, and would have the same effect in the default
> case, seems wrong.
Well, we don't want to have a literal lp_mangling_char(), becouse this
code get's hit *a lot*. You will notice that may parts of the code used
to do a strcmp() but now use some fancy per-character table lookups.
There might be some argument for using a static variable instead.
Andrew Bartlett abartlet at pcug.org.au
Manager, Authentication Subsystems, Samba Team abartlet at samba.org
Student Network Administrator, Hawker College abartlet at hawkerc.net
http://samba.org http://build.samba.org http://hawkerc.net
More information about the samba-technical