dealing with chain loops in TDB

James Peach jpeach at samba.org
Wed Jul 23 18:49:21 GMT 2008


Hi all,

I have a customer who is running Samba 3.0.25b (+ patches) and has a  
gencache.tdb with a loop in one of the hash chains.

I modified "tdbtool list" to detect the loop using the tortoise and  
hare algorithm, but there are an awful lot of places that walk the  
record list, so I'm loth to do this in every place.

Anyway, even if I detect the loop in every place, what is the right  
way to deal with it? I can see at least 3 options:
	1. break the loop by setting the next offset to 0
	2. breaking the loop by marking the record as dead
	3. just bail and leave it alone

So can anyone who knows TDB better than I do suggest a better generic  
fix than modifying all the code that walks the record lists? Can you  
also suggest the right way to break the loop?


More information about the samba-technical mailing list