Name mangling patch

Christopher R. Hertel crh at
Wed Mar 17 19:31:27 GMT 1999


Not really.  His first patch fixes (I haven't checked it, but it's
supposed to fix) that annoying problem I noticed but never tracked down, 
in which we were calling the mangling routines once too often.

So, the clash-avoidance wouldn't slow us down any more than it does now. 
Remember, too, that we're in a splay tree so speed shouldn't be a problem.

Thing is, and I have to check this, that the cache is there to allow 
bi-directional mangling, among other things.  If we do clash avoidance, 
then the algorithm *must* be bi-directional and consistant.

What if we have two names which mangle to the same thing (this is a very 
unreal example):

  Unix Name		DOS (mangled) name
  name one.bugs		name~.bxx
  name two.bugs		name~.bxx

Conflict.  So, we detect the conflict and remangle the second name.  
Cool, no conflict.  Except...

Someone deletes the first file (either on the DOS or Unix side, doesn't
matter).  When we next visit the directory (i.e., no cache in use), the 
other file's mangled name will have changed!  This is *no good* 
(particularly because the user will say "Oy!  I thought I'd deleted that 
file!  I'll just delete it again!  Oy!  Where's the other file?".

I think that this is a basic flaw in the idea of mangled name collision 
avoidance.  I don't know if there is a fix, but I'd like to look at the 

Chris -)-----

> francois, thx for patch.  som1 will evaluate it.
> name-mangling-avoiding-clashes requires a 2pass algorithm.  for spd, we
> only do 1pass.
> luke
> <a href="mailto:lkcl at"   > Luke Kenneth Casson Leighton  </a>
> <a href=""> Samba and Network Development </a>
> <a href=""        > Samba Web site                </a>
> =====================================================================
> Luke Kenneth Casson Leighton        |  Direct Dial   : (678) 443-6183
> Systems Engineer / ISS XForce Team  |  ISS Front Desk: (678) 443-6000
> Internet Security Systems, Inc.     |  ISS Fax       : (678) 443-6477
>    *Adaptive Network Security for the Enterprise*
>      ISS Connect   -   International User Conference   -  May '99
> =====================================================================

Christopher R. Hertel -)-----                   University of Minnesota
crh at              Networking and Telecommunications Services

More information about the samba-technical mailing list