CVS update: samba/source

Christopher Hertel crh at samba.anu.edu.au
Tue Apr 14 08:45:53 EST 1998


Date:	Tuesday April 14, 1998 @ 8:45
Author:	crh

Update of /data/cvs/samba/source
In directory samba:/tmp/cvs-serv23052

Modified Files:
	proto.h reply.c server.c mangle.c 
Log Message:
Changes include:

proto.h:  The unusual.  ;)
reply.c:  I changes some function names, and updated reply.c to match.
          See mangle.c below for more.
server.c: Changed function names and parameters in file mangle.c, so
          changed server.c calls to match.  See mangle.c below for more.

mangle.c:

  I replaced the caching mechanism used for caching reverse mangled name
  maps.  The old method was a large array of 256-byte strings.  Movement
  in the stack (including push and pop) was done by memcpy()ing whole
  chunks of memory around.

  The new system uses the ubi_Cache module which, in turn, uses a splay
  tree.  Entries are dynamically allocated using a minimum amount of
  memory.  Searches are non-linear, which should speed things up a bit,
  too.  Overall, this should save memory and be faster.

  Other changes:  I streamlined the is_mangled() test and made other
  speed enhancements including replacing some static functions with
  macros.  Added comments, etc.

Note:  Per an E'mail conversation with Andrew, the 'mangled stack'
       parameter in smb.conf doesn't do anything anymore.  The cache is
       now set for 16K bytes maximum memory usage.  The mangle stack
       parameter is silently ignored.  This can easily be changed, but
       I'd rather introduce a 'mangled cache memory' parameter and
       remove 'mangled stack'.

Remaining problems:
       While testing the module, I noticed that something is calling
       name_map_mangle() twice.  The result is that names which contain
       illegal characters are getting mangled twice.

       Also, the entire module works by overwriting the input string.
       This has a variety of nasty side effects.

Summary:

  There's a lot still to be done, but the changes I have in place *should*
  work in exactly the same way (except for the mangle stack parameter).
  The rest of the bugs and other issues are separate.

Chris -)-----




More information about the samba-cvs mailing list