prevent infinite loop with recurse option enabled?

Justin Yackoski justin at skiingyac.com
Tue Nov 6 06:09:03 GMT 2001


Thanks for your response.  Sorry if I was unclear about which 
computers they were.  The problem is that I do not have that sort of 
control over the boxes which the script crawls through.  Most of the 
computers are actually windows boxes with smb shares, few are linux 
boxes.  It actually is very possible to create a standard windows 
shortcut inside a share to someplare lower in the share and windows' 
smb server will follow it (and I don't know of a way to turn off that 
behavior even if I could get on all of the machines to do it,  but 
like I said, I can't get on them anyway).  I may be wrong, but it 
seems to me that the best solution is to checksum/hash the directory 
contents and name, and I find it hard to believe that two directories 
would be exactly identical very often... hopefully less often than 
people create infinite paths in their shares... but I don't really 
know.  It would be better to miss seeing one of two identical 
directories (and perhaps get some sort of warning from smbclient that 
a loop was detected in the directory) instead of it run on forever...

So, my revised question is: how do I prevent this strictly from the 
client side?

Thanks,
Justin

Chris Watt wrote:

> Incidentally this is also the reason I blithely assume
> that you're talking about Samba servers rather than Windows boxes. Complain
> if I'm wrong). I don't know of any way you could deal with this at the
> client side, short of checksumming the directory contents, and even that
> would be potentially harmful (no way to tell for sure that it is a repeat
> directory and not just a very similar one).


> At 05:49 PM 11/5/01 -0500, Justin Yackoski wrote:
> 
> 
>>Is there any current way to set a depth limit, or even better, just 
>>simply prevent visiting a directory twice (I've heard that wget hashes 
>>
> 



-- 
SkiingYAC.com
Web Design & Programming
http://www.skiingyac.com





More information about the samba mailing list