tdb: Add tdb_chainwalk_check
authorVolker Lendecke <vl@samba.org>
Thu, 4 Oct 2018 13:20:10 +0000 (15:20 +0200)
committerJeremy Allison <jra@samba.org>
Mon, 8 Oct 2018 20:17:10 +0000 (22:17 +0200)
commitb83763d175057f3400c8ae2785efdab612a51b9a
treee868861c29c0d6b4693ba3ef25125268cc6849a4
parent5ba7b2042b831931c9f88a5c740ad778a7e5f5e7
tdb: Add tdb_chainwalk_check

This captures the tdb_rescue protection against circular hash chains
with a slow pointer updated only on every other record traverse

If a hash chain has a loop, eventually the next_ptr
will cycle around and be identical to the 'slow' pointer.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/tdb/common/tdb.c
lib/tdb/common/tdb_private.h