[PATCH] ldbdump, and thanks for tdbdump -e!

Scott Lovenberg scott.lovenberg at gmail.com
Mon Oct 29 23:33:03 MDT 2012


On Tue, Oct 30, 2012 at 1:25 AM, Andrew Bartlett <abartlet at samba.org> wrote:

> Rusty,
>
> I figured you might be interested to see what I've done with the
> tdb_rescue API you built a few weeks ago.  Still trying to sort out the
> DB that we worked, I built ldbdump.  It uses the backend ldb_pack
> functions from ldb_tdb as well as the Samba syntax functions to
> determine if the potential DB record passed to the hook is a valid ldb
> record.
>
> This eliminated around 12 more records - indeed all the 'duplicate'
> records you found could be eliminated as actually not being valid
> records at all.
>
> Thank you very much for the tdb_rescue API and tdbdump -e, it would not
> be possible to recover so much of the data without it.
>
> Naturally, it will need a manpage and popt conversion before it is
> installed, but for now it may be the vital tool for some other
> unfortunate site that forgets to enable barrier=1 on their ext3
> partitions.
>

Silly question, why does traverse_fn() return 0 if ltdb_unpack_data()
doesn't return 0?  Wouldn't it make sense to propagate the error code
instead of just outputting to stderr and returning success?

-- 
Peace and Blessings,
-Scott.


More information about the samba-technical mailing list