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>
Fri, 15 May 2009 09:46:53 +0000 (11:46 +0200)
commit6d82b5975598f1742c53ebdaa2fa89f7cf148b85
tree248e5243954145322fb8de489e7c956d5a439479
parent4dce2dfb5b547d90b13597672abc2cae1a062b53
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
source3/Makefile.in
source3/utils/dbwrap_tool.c [new file with mode: 0644]