proposed fix to use safe recursion with smbclient

Justin Yackoski justin at
Mon Feb 11 09:07:34 GMT 2002

Currently, smbclient has a "recurse" command which toggles whether
things like ls, mget, etc. are recursive or not.  Unfortunately, it has
no checking like that of wget to make sure the recursion isn't infinite.
The only limit is smbclient's hard depth limit of 40.  I've modified
client/client.c to add a "saferecurse" command which does the same thing
as recurse but it checks for inifinite recursion.  I've tested it and it
works, the performance hit (from hashing & such) isn't noticable even on
very large directory trees.  A directory tree of 20000+ files ran in the
same time down to the second both ways.

I tried to submit it already to samba at as samba's documentation
indicates, but did not receive a response.  Is there anyone who is
perhaps interested in testing this out, or is there a better place I can
send the patch so that it will hopefully be included in smbclient?  The
patch is about 250 lines, much of which is just modified code from
elsewhere in samba's source, and I hesitate to include it in this email
because of the slight length.  I figured this list may be a better place
since it does deal with some finer details of samba.  Any help would be

Web Design & Programming

More information about the samba-technical mailing list