diff options
author | Ralph Boehme <slow@samba.org> | 2017-07-09 18:39:27 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2017-08-22 23:32:13 +0200 |
commit | a43affd4c509246f968d7003e1b674f92d75d930 (patch) | |
tree | 5e53edae29192aa08ad37d3d718b3adb7aec381a | |
parent | d2c78695c60a1902fd10197f762b84ee83372b6e (diff) | |
download | samba-a43affd4c509246f968d7003e1b674f92d75d930.tar.gz |
tdb: fix tbdtool list freelist output
Due to the non-fixable bug in the BUCKET macro tdbtool list printed some
other hash chainlist, not the freelist.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=12888
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r-- | lib/tdb/common/dump.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/tdb/common/dump.c b/lib/tdb/common/dump.c index 5f6a78b2c8e..73286b87350 100644 --- a/lib/tdb/common/dump.c +++ b/lib/tdb/common/dump.c @@ -62,7 +62,11 @@ static int tdb_dump_chain(struct tdb_context *tdb, int i) { tdb_off_t rec_ptr, top; - top = TDB_HASH_TOP(i); + if (i == -1) { + top = FREELIST_TOP; + } else { + top = TDB_HASH_TOP(i); + } if (tdb_lock(tdb, i, F_WRLCK) != 0) return -1; |