summaryrefslogtreecommitdiff
path: root/source3/winbindd/idmap_tdb2.c
AgeCommit message (Collapse)AuthorFilesLines
2010-08-14s3:idmap_tdb2: remove use of idmap_tdb2_state from idmap_tdb2_allocate_idMichael Adam1-4/+8
idmap_tdb2_state should actually be called idmap_tdb2_alloc_context. This is being removed as the idmap and allocation is moved together. We use the idmap_tdb2_context * that is sitting in dom->private_data. This contains the same ranges as those in the state anyways. Later, when we can also allocate for named domains, this will become necessary anyways.
2010-08-14s3:idmap_tdb2: move definition of struct idmap_tdb2_context up.Michael Adam1-4/+5
2010-08-14s3:idmap_tdb2: open the db after loading the ranges in idmap_tdb2_db_init().Michael Adam1-3/+5
2010-08-14s3:idmap_tdb2: add allocation of new mappings to idmap_tdb2_sids_to_unixidsMichael Adam1-22/+173
This moves the new_mapping feature inside the tdb2 backend to make creations of mappings atomic. Note: The new internal function idmap_tdb2_get_new_id() that is used to allocate a new unix id is prepared to function for multiple explicitly configured idmap domains, but currently it does only work for the default domain. The extended allocation support requires extension of the data base format to store multiple counters (per domain). This will be added in a later step (TODO!).
2010-08-14s3:idmap_tdb2: re-implement allocated_id in idmap methods.Michael Adam1-0/+1
2010-08-14s3:idmap_tdb2: remove unused idmap_tdb2_alloc_init().Michael Adam1-12/+0
2010-08-14s3:idmap_tdb2: remove unused idmap_tdb2_alloc_close().Michael Adam1-9/+0
2010-08-14s3:idmap_tdb2: remove unused idmap_alloc_methods.Michael Adam1-6/+0
2010-08-14s3:idmap_tdb2: don't call smb_register_idmap_alloc() in idmap_tdb2_initMichael Adam1-9/+0
The registering of alloc backends is being removed. The idmap backends are responsible for initializing their alloc code on their own if necessary.
2010-08-14s3:idmap: remove the set_mapping method from the idmap APIMichael Adam1-1/+0
2010-08-14s3:idmap: remove unused method set_id_hwm from idmap APIMichael Adam1-12/+0
Michael
2010-08-14s3:idmap: remove unused alloc method get_id_hwm from idmap APIMichael Adam1-49/+0
Michael
2010-08-14s3:idmap: remove unused method dump_data() from the idmap APIMichael Adam1-11/+0
Michael
2010-08-14s3:idmap: remove the remove_mapping method from API and backendsMichael Adam1-12/+0
Michael
2010-08-14s3:idmap_tdb2: fix a debug messageMichael Adam1-1/+1
2010-05-20s3:winbind:idmap_tdb2_set_mapping: untangle assignment from checkMichael Adam1-1/+2
2010-04-29s3: range-check idmap script outputVolker Lendecke1-0/+13
Not doing so results in the id mapping succeeding once unchecked and later on being refused, because when reading from the tdb we do the checks.
2010-04-29s3: Fix an uninitialized variable in idmap_tdb2_sid_to_id()Volker Lendecke1-0/+1
When we find an invalid record in the database, there's no point in checking the non-existing value against the range limits.
2010-04-29s3: Fix some nonempty blank linesVolker Lendecke1-14/+14
2009-08-20s3-idmap: fix two uninitialized variable warnings in idmap_tdb2.Günther Deschner1-3/+3
Guenther
2009-07-29s3:winbind: use transaction in idmap_tdb2_allocate_id_action().Michael Adam1-1/+1
This uses the new dbwrap_trans_change_uint32_atomic() instead of dbwrap_change_uint32_atomic(). Now all db write operations in idmap_tdb2.c are using transactions. Michael
2009-07-29s3:dbwrap: change dbwrap_change_uint32_atomic() to return NTSTATUS not uint32_t.Michael Adam1-4/+2
Michael
2009-07-29s3:winbind: in idmap_tdb2_sid_to_id(), use transaction wrapped stores.Michael Adam1-9/+15
When a mapping is not found, then the idmap script is called (if defined). When this gives a reply for the desired sid, this reply is stored in the db. This patch wraps theses two store operations into a transaction by re-using the idmap_tdb2_set_mapping_action() function previously defined for idmap_tdb2_set_mapping(). Michael
2009-07-29s3:winbind: in idmap_tdb2_id_to_sid(), use transaction wrapped stores.Michael Adam1-9/+12
When a mapping is not found, then the idmap script is called (if defined). When this gives a reply for the desired id, this reply is stored in the db. This patch wraps theses two store operations into a transaction by re-using the idmap_tdb2_set_mapping_action() function previously defined for idmap_tdb2_set_mapping(). Michael
2009-07-29s3:winbind: use transaction wrapper in idmap_tdb2_allocate_id()Michael Adam1-43/+69
Michael
2009-07-29s3:winbind: use transaction wrapper in idmap_tdb2_set_mapping()Michael Adam1-49/+55
Michael
2009-05-27s3:idmap_tdb2: filter out of range mappings in default idmap configMichael Adam1-12/+49
This fixes bug #6416 Michael
2009-03-02More fix to initialize idmap statusesBo Yang1-0/+10
2009-02-06s3:idmap_tdb2: untangle assignment and check in idmap_tdb2_alloc_load()Michael Adam1-6/+4
Michael
2009-02-06s3:idmap_tdb2: factor lodaing of ranges out into idmap_tdb2_load_ranges()Michael Adam1-25/+41
Michael
2009-02-06s3:idmap_tdb2: move together code that belongs together in idmap_tdb2_alloc_loadMichael Adam1-7/+8
Michael
2009-02-06s3:idmap_tdb2: streamline idmap_tdb2_sid_to_id,Michael Adam1-6/+7
adding tmp talloc ctx and removing a variable Michael
2008-09-29removed unused variablesAndrew Tridgell1-2/+1
2008-09-29fixed segv on startup with trusted domainsAndrew Tridgell1-0/+16
With some setups, idmap_tdb2_allocate_id can be called before the allocate backend is initialised, leading to a segv. This change ensures that the db is opened in all paths that use it
2008-08-13use transactions in idmap_tdb2Andrew Tridgell1-18/+42
(This used to be commit 32b8db27652a66a2ade547a6d27f34d0816f7296)
2008-08-13got rid of the redundent cache databaseAndrew Tridgell1-134/+28
(This used to be commit 126f4ac8e85458ee4693b89a184b99420f1b6bee)
2008-08-13idmap tdb2: fix inconsistent mappings by checking for race and retrying to ↵Michael Adam1-57/+13
fetch mapping. Michael (This used to be commit cb4c74c9c206e5a445ca636fa6562ce721ea5839)
2008-08-13idmap tdb2: fix broken logic in tdb2_delete_bystring().Michael Adam1-5/+8
1. use the return value that idmap_tdb2_open_perm_db() gives us 2. don't delete frep the local db if deleting from the perm db failed. 3. fix wrong interpretation of return value of the local delete Michael (This used to be commit 147573d7f6faab0ad90258b6a28c4b9575ccb6ea)
2008-08-13idmap tdb2: fix broken logic in tdb2_store_bystring().Michael Adam1-5/+8
1. use the return value that idmap_tdb2_open_perm_db() gives us 2. don't write to the local db if writing to the perm db failed. 3. fix wrong interpretation of return value of the local store Michael (This used to be commit be8c6b4f2f40014313899b5cbc1da9d390d94fee)
2008-08-12Remove "idmap alloc config : range" parameterVolker Lendecke1-54/+37
This was overwritten by "idmap uid/gid" anyway. These are now the range parameters for the alloc backend. (This used to be commit d563a7b80dc3e759069db2cd54d596a1b8c55191)
2008-08-12idmap rewriteVolker Lendecke1-26/+2
(This used to be commit 30a180f2fce8cf6a3e5548f6bba453272ba70b33)
2008-07-11Revert "Fix nonempty whitespace only lines"Volker Lendecke1-14/+14
This reverts commit cc77db2acbc35cea58576f1e28c7a760a5e31609. (This used to be commit ed5b516c2027d78011cdaa7cbbc01bb01e766381)
2008-07-02Fix nonempty whitespace only linesVolker Lendecke1-14/+14
(This used to be commit cc77db2acbc35cea58576f1e28c7a760a5e31609)
2008-01-16Convert old sid-string handling in idmap_tdb2 to a new oneAlexander Bokovoy1-4/+7
(This used to be commit ee851730cef1eb506b47faf57e25789ad3c6aafa)
2008-01-16idmap TDB2 backend, used for clustered Samba setups.Alexander Bokovoy1-0/+1014
This uses 2 tdb files. One is permanent, and is in shared storage on the cluster (using "tdb:idmap2.tdb =" in smb.conf). The other is a temporary cache tdb on local storage. Signed-off-by: Alexander Bokovoy <ab@samba.org>(This used to be commit b6df7e7709365fb620867ad8954bc5bf24496775)