summaryrefslogtreecommitdiffstats
path: root/source3/utils/net_idmap_check.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>
* lib/util_tdb: factor out tdb_data_talloc_copy()Gregor Beck2013-02-191-19/+4
| | | | | | Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* dbwrap: dbwrap_fetch_uint32->dbwrap_fetch_uint32_bystringVolker Lendecke2012-06-151-2/+2
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* 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.
* lib/util: factor out tdb_data_is_emptyGregor Beck2011-12-031-10/+7
| | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Sat Dec 3 05:20:30 CET 2011 on sn-devel-104
* s3:net: adapt idmap check to new dbwrap_fetch behavior not to return success ↵Gregor Beck2011-12-031-6/+2
| | | | | | if not found Signed-off-by: Michael Adam <obnox@samba.org>
* s3:net: factor out interact_edit()Gregor Beck2011-10-121-93/+1
| | | | 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/+8
| | | | | | bool) for consistency and better error propagation
* s3:net: convert net idmap check to use dbwrap wrapper functions.Michael Adam2011-10-111-26/+55
| | | | Avoid direct use of the db_record and db_context structs.
* s3:dbwrap: convert dbwrap_fetch(), dbwrap_fetch_bystring() and ↵Michael Adam2011-10-111-1/+4
| | | | dbwrap_fetch_bystring_upper() to NTSTATUS
* s3:dbwrap: change the dbwrap_traverse() wrapper to return the count in an ↵Michael Adam2011-10-111-3/+3
| | | | additional parameter
* s3:dbwrap: move the db_open_rbt() prototype to a new header dbwrap_rbt.hMichael Adam2011-10-111-0/+1
|
* s3:utils: avoid '//' commentsStefan Metzmacher2011-10-081-1/+1
| | | | | | The compiler on openindiana doesn't like them. metze
* 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.
* tdb_compat: Higher level API fixes.Rusty Russell2011-06-201-2/+2
| | | | | | | | | | | | My previous patches fixed up all direct TDB callers, but there are a few utility functions and the db_context functions which are still using the old -1 / 0 return codes. It's clearer to fix up all the callers of these too, so everywhere is consistent: non-zero means an error. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* s3: only include tdb headers where needed.Günther Deschner2011-05-061-0/+1
| | | | Guenther
* s3:net idmap check: fix output of an invalid recordMichael Adam2011-04-081-1/+6
| | | | | | | | | Only print the value number for hwm, version and seqnum keys. Pair-Programmed-With: Gregor Beck <gbeck@sernet.de> Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Fri Apr 8 17:29:31 CEST 2011 on sn-devel-104
* s3-net: "idmap check" ignore __db_sequence_number__Gregor Beck2011-04-081-1/+7
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* s3:net idmap check: fix a couple of c++ implicit void * cast warningsMichael Adam2011-04-071-5/+5
|
* s3-net: add command "net idmap check"Gregor Beck2011-04-041-0/+1006
This is a tool to check the consistency of an idmap tdb database. The default mode is to scan the database and list invalid entries, e.g. records with an invalid format, or records which are valid but for which the reverse mapping entry is missing. With the "--repair" switch, one can enter an interactive repair mode which will prompt for each invalid entry found with the option to delete, skip or edit the record. There is also a non-interactive repair mode triggered by "--auto" which will remove all records with invalid content and fill up mappings which are missing the reverse entry. The "--test" parameter lets "net idmap check" only list the changes that would be written and not actually commit them to the database. The "--lock" option allows to lock the database already in the first reading traverse, in order to remove the race when the database has to be closed and reopened again before writing the changes. Signed-off-by: Michael Adam <obnox@samba.org> Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Mon Apr 4 18:21:09 CEST 2011 on sn-devel-104