Changing recurse option from hard limit to something "smarter"

Justin Yackoski justin at skiingyac.com
Fri Nov 16 14:08:01 GMT 2001


I am developing a php/mysql system which crawls a local network for
shares, and compiles a list of all available files, making searching the
whole network much more feasible.  The other person working on this
project has made functions which call smbclient to list a share's
contents recursively and parse the output, and another one which uses
one smbclient call for each subdirectory to manually limit the depth of
the recursion (which is much slower and hairier).  The problem is that
samba's recursion depth appears hard coded at 40, and no attempt at all
is made to detect and avoid recursion loops.  A hashing technique is
used by wget to accomplish this, and it seems to do so very well.
Wget's man page states: "Infinite recursion loops are always avoided by
hashing the retrieved data".  Would it be possible to add this
functionality to smbclient?  I am not referring to a samba server
preventing recursion by not following symlinks, etc., I am referring to
smbclient connecting to a computer whose directory structure cannot be
guaranteed to finitely recurse.  Is there any work on this currently,
would such a feature be possible, or is there some technical reason why
samba currently can't do this?

Thanks for your help,
Justin





More information about the samba-technical mailing list