summaryrefslogtreecommitdiffstats
path: root/source3/utils/dbwrap_tool.c
Commit message (Collapse)AuthorAgeFilesLines
* dbwrap: add a dbwrap_flags argument to db_open()Michael Adam2014-02-071-1/+1
| | | | | | | | | | This is in preparation to support handing flags to backends, in particular activating read only record support for ctdb databases. For a start, this does nothing but adding the parameter, and all databases use DBWRAP_FLAG_NONE. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* dbwrap_tool: add option "--non-persistent" and force excatly one of ↵Michael Adam2014-01-301-5/+18
| | | | | | | | | | | | | "--[non-]persistent" We want to force users of dbwrap_tool to explicitly specify persistent or non-persistent. Otherwise, one could easily by accident wipe a whole database that is actually persistent but not currently opened by a samba process, just by openeing the DB with the default non-persistent mode... Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* dbwrap_tool: remove the short form "-p" of "--persistent"Michael Adam2014-01-301-1/+1
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:utils/dbwrap_tool add exists operationChristian Ambach2013-04-221-4/+34
| | | | | Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3:utils: make use of samba_tevent_context_init()Stefan Metzmacher2013-02-191-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:dbwrap_tool: add --persistent switch and mode for non-persistent DBsMichael Adam2013-01-151-12/+45
| | | | | | | This changes the default for dbwrap_tool to open a DB as non-persistent. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* dbwrap: dbwrap_trans_store_uint32->dbwrap_trans_store_uint32_bystringVolker Lendecke2012-06-151-1/+1
| | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Fri Jun 15 14:20:04 CEST 2012 on sn-devel-104
* dbwrap: dbwrap_trans_store_int32->dbwrap_trans_store_int32_bystringVolker Lendecke2012-06-151-1/+1
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* dbwrap: dbwrap_fetch_uint32->dbwrap_fetch_uint32_bystringVolker Lendecke2012-06-151-1/+1
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* dbwrap: dbwrap_fetch_int32->dbwrap_fetch_int32_bystringVolker Lendecke2012-06-151-1/+1
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* s3-dbwrap: Add "listwatchers" to dbwrap_toolVolker Lendecke2012-04-191-9/+62
|
* s3: Remove a typedefVolker Lendecke2012-01-241-3/+3
| | | | | | | | We have it in README.Coding to avoid typedef for structs, but I think it also applies to enums. Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Tue Jan 24 22:45:50 CET 2012 on sn-devel-104
* s3: Remove a typedefVolker Lendecke2012-01-241-3/+3
|
* s3: Add a "lock_order" argument to db_openVolker Lendecke2012-01-181-1/+2
| | | | | | | This will be used to enforce a lock hierarchy between the databases. We have seen deadlocks between locking.tdb, brlock.tdb, serverid.tdb and notify*.tdb. These should be fixed by refusing a dbwrap_fetch_locked that does not follow a defined lock hierarchy.
* s3: Remove a bunch of calls to procid_self()Volker Lendecke2011-12-121-1/+1
| | | | All callers to messaging_[re]init only used procid_self()
* s3-util: dbwrap_tool: fix fetch_string functionBjörn Baumbach2011-10-261-1/+1
| | | | | | | | | We do not want truncated strings. Signed-off-by: Michael Adam <obnox@samba.org> Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Wed Oct 26 04:17:05 CEST 2011 on sn-devel-104
* s3-util: dbwrap_tool: add fetch fuctions for hex and stringBjörn Baumbach2011-10-181-0/+61
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* s3-util: dbwrap_tool: add store hex functionBjörn Baumbach2011-10-181-3/+43
| | | | | | Allows the user to store hex blobs in a tdb. Signed-off-by: Michael Adam <obnox@samba.org>
* s3-utils: add capabilities to dbwrap_toolBjörn Baumbach2011-10-141-17/+38
| | | | | | Make it possible to work with strings in addition to int32 and uint32. Signed-off-by: Michael Adam <obnox@samba.org>
* s3:dbwrap: change dbwrap_fetch_uint32() to NTSTATUS return type (instead of ↵Michael Adam2011-10-111-4/+4
| | | | | | bool) for consistency and better error propagation
* s3:dbwrap: convert dbwrap_fetch_int32() to NTSTATUS return codeMichael Adam2011-10-111-1/+7
| | | | | | Return the int32 value retrieved from the db by reference. Before this, return value "-1" was used as a error indication, but it could also be a valid value from the database.
* s3:dbwrap_tool: convert to using wrapper functions onlyMichael Adam2011-10-111-9/+9
|
* s3:dbwrap_tool: add popt support and standard samba optionsMichael Adam2011-09-201-14/+44
|
* s3:dbwrap: move all .c and .h files of dbwrap to lib/dbwrap/Michael Adam2011-07-291-1/+1
| | | | | Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Fri Jul 29 13:34:22 CEST 2011 on sn-devel-104
* s3:dbwrap: move db_open() to a file dbwrap_open.c of its own.Michael Adam2011-07-291-0/+1
| | | | | | Also start new folder lib/dbwrap/ where dbwrap_open.c is stored and make the fallbacke implementation functoins non-static and create a dbwrap_private.h header file that contains their prototypes.
* s3:dbwrap_tool: use lp_load_global()Michael Adam2011-07-281-1/+1
|
* s3-messages: only include messages.h where needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3-includes: only include system/filesys.h when needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3-debug Remove 'AllowDebugChange' and use lp_set_cmdline() insteadAndrew Bartlett2010-11-021-4/+1
| | | | | | | | | By removing this global variable, the API between the two different debug systems is made more similar. Both s3 and s4 now have lp_set_cmdline() which ensures that the smb.conf cannot overwrite these the user-specified log level. Andrew Bartlett
* s3-debug Impove setup_logging() to specify logging to stderrAndrew Bartlett2010-11-021-1/+1
| | | | | | | | This change improves the setup_logging() API so that callers which wish to set up logging to stderr can simply ask for it, rather than directly modify the dbf global variable. Andrew Bartlett
* s3-build: use dbwrap.h only where needed.Günther Deschner2010-08-261-0/+1
| | | | Guenther
* s3: Consolidate server_id_self into the equivalent procid_self()Volker Lendecke2010-02-231-1/+1
|
* s3:dbwrap_tool: add listkeys operationMichael Adam2009-05-261-2/+45
| | | | Michael
* s3:dbwrap_tool: remove superfluous command mappingMichael Adam2009-05-261-1/+0
| | | | Michael
* s3:dbwrap_tool: add "erase" opearationMichael Adam2009-05-261-6/+42
| | | | Michael
* s3:first cut at dbwrap_tool - a tdb tool that is CTDB-aware.Michael Adam2009-05-151-0/+247
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