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 16:17:00 +0000 (18:17 +0200)
commit5085c853e87cc5875b1a38e6558a5412a69e1d08
tree8a4481b28c9c674bb25d9f74ed488211b82f72fb
parentb5b5718552f44ac4fc961c38eb3a8ff02eab18f9
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
(cherry picked from commit 6d82b5975598f1742c53ebdaa2fa89f7cf148b85)
source3/Makefile.in
source3/utils/dbwrap_tool.c [new file with mode: 0644]