summaryrefslogtreecommitdiff
path: root/source3/winbindd/idmap_tdb.c
Commit message (Collapse)AuthorAgeFilesLines
* lib: Pass mem_ctx to state_path()Volker Lendecke2018-08-171-1/+1
| | | | | | | | Fix a confusing API: Many places TALLOC_FREE the path where it's not clear you have to do it. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* lib: modules: Change XXX_init interface from XXX_init(void) to ↵Jeremy Allison2017-04-221-1/+1
| | | | | | | | | | | | | | | | | | | | XXX_init(TALLOC_CTX *) Not currently used - no logic changes inside. This will make it possible to pass down a long-lived talloc context from the loading function for modules to use instead of having them internally all use talloc_autofree_context() which is a hidden global. Updated all known module interface numbers, and added a WHATSNEW. Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Ralph Böhme <slow@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Apr 22 01:17:00 CEST 2017 on sn-devel-144
* Convert the few instances of int32 there were to int32_t.Richard Sharpe2015-05-161-2/+2
| | | | | | | | Signed-off-by: Richard Sharpe <rsharpe@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat May 16 03:09:12 CEST 2015 on sn-devel-104
* Change all uint32/16/8 to 32_t/16_t/8_t in winbindd.Richard Sharpe2015-04-291-1/+1
| | | | | Signed-off-by: Richard Sharpe <rsharpe@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* 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: remove get_flags().Rusty Russell2012-06-221-17/+2
| | | | | | | | | | | | The flags returned were TDB-specific: this was only used for detecting the endianness of obsolete databases (the conversion code was put in in 2003, with reference to Samba 2.3). It's easier to remove it than to translate the NTDB flags to TDB flags, and it's a really weird thing to ask for anyway. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* TDB2: make SAMBA use tdb1 again for the moment.Rusty Russell2012-06-191-4/+0
| | | | | | | Otherwise the following surgery will break the SAMBA build and testsuite. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* dbwrap: dbwrap_store_uint32->dbwrap_store_uint32_bystringVolker Lendecke2012-06-151-2/+4
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* dbwrap: dbwrap_fetch_uint32->dbwrap_fetch_uint32_bystringVolker Lendecke2012-06-151-2/+2
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* dbwrap: dbwrap_store_int32->dbwrap_store_int32_bystringVolker Lendecke2012-06-151-3/+4
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* dbwrap: dbwrap_fetch_int32->dbwrap_fetch_int32_bystringVolker Lendecke2012-06-151-4/+4
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* s3:winbindd/idmap_tdb: use idmap_tdb_common codeChristian Ambach2012-05-011-558/+18
|
* 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:dbwrap: change dbwrap_store_uint32() to NTSTATUS return typeMichael Adam2011-10-111-7/+6
| | | | | | | for consistency and better error propagation Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Tue Oct 11 15:51:00 CEST 2011 on sn-devel-104
* s3:dbwrap: change dbwrap_store_int32() to NTSTATUS return typeMichael Adam2011-10-111-6/+12
| | | | for consistency and better error propagation
* s3:dbwrap: change dbwrap_fetch_uint32() to NTSTATUS return type (instead of ↵Michael Adam2011-10-111-6/+5
| | | | | | bool) for consistency and better error propagation
* s3:dbwrap: convert dbwrap_fetch_int32() to NTSTATUS return codeMichael Adam2011-10-111-4/+18
| | | | | | 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:idmap_tdb: fix hwm-handling to use uint32 consistentlyMichael Adam2011-10-111-8/+10
| | | | The initialization code user int32, later writes used uint32...
* s3:idmap: convert idmap_tdb to use dbwrap wrapper functions.Michael Adam2011-10-111-22/+34
| | | | Avoid direct use of the db_record and db_context structs.
* s3:dbwrap: convert dbwrap_fetch(), dbwrap_fetch_bystring() and ↵Michael Adam2011-10-111-4/+4
| | | | dbwrap_fetch_bystring_upper() to NTSTATUS
* 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.
* source3/winbindd/idmap_tdb.c: tdb2 support for wrong endian.Rusty Russell2011-06-201-2/+16
| | | | | | | | | TDB has no idea of endian itself, but it knows whether the TDB is the same endian as the current machine, so we should use that rather than implementing TDB_BIGENDIAN in tdb2. 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-includes: only include system/filesys.h when needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3: Fix Coverity ID 2296: UNUSED_VALUEVolker Lendecke2011-03-271-3/+0
| | | | | Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Sun Mar 27 12:12:35 CEST 2011 on sn-devel-104
* s3:idmap: remove the params argument from the init functionMichael Adam2011-03-221-1/+1
|
* s3: Remove close_fn from idmap_methodsVolker Lendecke2011-03-061-6/+0
| | | | | Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Sun Mar 6 13:37:13 CET 2011 on sn-devel-104
* s3-idmap-tdb: private_data is a talloc child of domVolker Lendecke2011-03-061-7/+0
|
* s3: Fix some nonempty blank linesVolker Lendecke2011-02-271-9/+9
|
* s3: Fix a typo in a DEBUG msgVolker Lendecke2010-11-021-1/+1
| | | | | Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Tue Nov 2 13:13:39 UTC 2010 on sn-devel-104
* libcli/security Provide a common, top level libcli/security/security.hAndrew Bartlett2010-10-121-0/+1
| | | | | | | | | | | | | | This will reduce the noise from merges of the rest of the libcli/security code, without this commit changing what code is actually used. This includes (along with other security headers) dom_sid.h and security_token.h Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Tue Oct 12 05:54:10 UTC 2010 on sn-devel-104
* s3-build: use dbwrap.h only where needed.Günther Deschner2010-08-261-0/+1
| | | | Guenther
* s3-idmap: only include idmap headers where needed.Günther Deschner2010-08-261-0/+1
| | | | Guenther
* s3-idmap: fix uninitialized variable in idmap_tdb_sids_to_unixids_action().Günther Deschner2010-08-191-1/+1
| | | | | | Michael, please check. Guenther
* s3:idmap_tdb: use idmap_rw_new_mapping in idmap_tdb_new_mappingMichael Adam2010-08-141-34/+3
|
* s3:idmap_tdb: add idmap_rw_ops to idmap_tdb_context and initialize them in ↵Michael Adam2010-08-141-0/+15
| | | | init_db
* s3:idmap_tdb: add my (C)Michael Adam2010-08-141-0/+1
|
* s3:idmap_tdb: properly initialize the idmap_tdb context with zeroMichael Adam2010-08-141-1/+1
|
* s3:idmap_tdb: prevent opening the idmap db more than once.Michael Adam2010-08-141-0/+5
|
* s3:idmap_tdb: rewrite sids_to_unixids to create mappings for unmapped sids.Michael Adam2010-08-141-19/+72
|
* s3:idmap_tdb: add a idmap_tdb_new_mapping().Michael Adam2010-08-141-0/+52
| | | | | | | High level function to create a new mapping for an unmapped sid. This builds logic that used to reside in the top level idmap code in the backend. To be called inside a transaction to guarantee atomicity of the operation.
* s3:idmap_tdb: move the set_mapping code upMichael Adam2010-08-141-103/+104
|
* s3:idmap_tdb: use transaction wrapper for idmap_tdb_set_mapping().Michael Adam2010-08-141-38/+46
|
* s3:idmap_tdb: remove unused struct idmap_tdb_state.Michael Adam2010-08-141-8/+0
|
* s3:idmap_tdb: remove unused idmap_alloc_dbMichael Adam2010-08-141-2/+0
|
* s3:idmap_tdb: remove unused idmap_tdb_alloc_close().Michael Adam2010-08-141-10/+0
|
* s3:idmap_tdb: give idmap_domain arg to idmap_tdb_allocate_id and use ctx->dbMichael Adam2010-08-141-5/+9
| | | | instead of alloc_db
* s3:idmap_tdb: call idmap_tdb_init_hwm() from idmap_tdb_open_db().Michael Adam2010-08-141-1/+2
|
* s3:idmap_tdb: move idmap_tdb_init_hwm up.Michael Adam2010-08-141-62/+58
|