On Wed, 2007-05-09 at 00:05 +0530, Aravinda Guzzar
wrote:> Hi,
>
> Does someone know a document which explains the TDB structure.
> functionalites, and format of the TDB files etc.
>
> I need to understand why some of the TDBs like messages.tdb,
unexpected.tdb,
> brlock if not read_only, locking.tdb, session.tdb, wins.tdb are called with
> TDB_CLEAR_IF_FIRST tdb flags.
This flag is used to clean up the db contents on startup. If the process
is the first consumer it will clean out the TDB, otherwise not.
This is used because these are temporary TDBs, it make no sense to keep
the content when the consumers are restarted from scratch.
> Why some TDBs are opend with O_RDWR|O_CREAT flags viz. gencache.tdb,
> group_mapping.tdb, account_policy.tdb, share_info.tdb, secrets.tdb.
> schannel_store.tdb etc. etc.
These are permanent TDBs, you need to create them only if they do not
exists, otherwise just open RW.
> why registry.tdb is uniquely been tried to open with O_RDWR flag and if
> fails then tried with O_RDWR|O_CREAT flag.
no idea
> and such internal details of the TDBs.
I think the best we have right now is in tdb/docs/README
Feel free to post wuestions but you will have better chances to reach
the developers (ie people that understand TDB internals) by posting at
samba-technical@samba.org
Simo.
--
Simo Sorce
Samba Team GPL Compliance Officer
email: idra@samba.org
http://samba.org