s3:first cut at dbwrap_tool - a tdb tool that is CTDB-aware.
authorMichael Adam <obnox@samba.org>
Thu, 14 May 2009 23:48:55 +0000 (01:48 +0200)
committerMichael Adam <obnox@samba.org>
Mon, 18 May 2009 09:16:16 +0000 (11:16 +0200)
commit85cd942697db131baa74cf97c27c34f3f02e01d1
tree0ba6314c4760f0e7474b1c496147fdcae34385b1
parent7cefc534a5028123fb3c9f75b20fb34a2e0ab588
s3:first cut at dbwrap_tool - a tdb tool that is CTDB-aware.

This tool (in contrast to tdbtool) reads Samba's configuration
and if clustering = yes, it talks to CTDB instead of accessing
the TDB data bases directly. This is done by simply using
the dbwrap mechanim, just like the Samba daemons.

This first version can read and write int32 and uint32 values
and delete records from a (c)tdb database.
More operations will follow.

This tool can already be useful in CTDB environments, e.g. when
"net idmap restore" fails to set the USER and GROUP HWM keys,
because the methods are deliberately not implemented in
idmap_tdb2.c. You can manually set the high water marks
with
"dbwrap_tool store idmap_tdb2.tdb 'USER HWM' int32 12345"
and
"dbwrap_tool store idmap_tdb2.tdb 'GROUP HWM' int32 67890"

Michael
source/Makefile.in
source/utils/dbwrap_tool.c [new file with mode: 0644]