Browse List Mangling

Martin.Sheppard at csiro.au Martin.Sheppard at csiro.au
Fri Oct 19 01:07:12 GMT 2001


Hi,

I have created a framework for arbitrarily modifying browse lists (the
Network Neighbourhood view) with Samba. This can be quite useful in a large
organisation. For example, in our area the entire browse list consists of
about 200 domains/workgroups and 2000 hosts in the domain with our machines.
We reduce this down to 23 workgroups and 35 computers that are actually
relevant to our site without affecting people at other sites. You can do
lots of stuff like making fake workgroups, filtering based on name or
description patterns, etc. 

This cleans up some duplicate code in serverlistdb.c, it doesn't change any
functionality and applies to both 2.0 and 2.2:
http://www.dhn.csiro.au/pub/samba-2.2.2-browsecleanup.patch

These two add a parameter to smb.conf called "browse mangle command", this
is required for the next patch to work:
http://www.dhn.csiro.au/pub/samba-2.0.10-browsemangle-param.patch
http://www.dhn.csiro.au/pub/samba-2.2.2-browsemangle-param.patch

This patch changes nmbd to run the browse.dat file through a filter program
before writing it out, if "browse mangle command" is defined. It applies to
both 2.0 and 2.2, but requires sys_fork() to be changed to fork() for it to
work in 2.0:
http://www.dhn.csiro.au/pub/samba-2.2.2-browsemangle-serverlistdb.patch

Here is a sample filter program, it is basically what we are using here in
production at the moment:
http://www.dhn.csiro.au/pub/browsemangle.pl

No functionality is changed by these patches unless "browse mangle command"
is defined in smb.conf. Can this be included in the samba source. I'm happy
to write the documentation for it and clean it up a little, but I'm only
going to bother if it is actually going to be included in the main source
tree.

Cheers,

Martin.




More information about the samba-technical mailing list