summaryrefslogtreecommitdiffstats
path: root/source3/winbindd/idmap_tdb2.c
Commit message (Collapse)AuthorAgeFilesLines
...
* s3:idmap_tdb2: pass idmap_domain (not idmap_tdb2_context) to ↵Michael Adam2010-08-141-7/+5
| | | | idmap_tdb2_sid_to_id
* s3:idmap_tdb2: pass idmap_domain instead of idmap_tdb2_context to ↵Michael Adam2010-08-141-6/+7
| | | | | | | idmap_tdb2_unixids_to_sids The reason for this will become apparent later: The ranges are being moved to the idmap_domain: They are universal.
* s3:idmap_tdb2: also support idmap script for named domainsMichael Adam2010-08-141-0/+5
| | | | this can be configured via "idmap config DOMAIN : script = foobar"
* s3:idmap_tdb2: move the idmap script from idmap_tdb2_state to idmap_tdb2_contextMichael Adam2010-08-141-15/+11
| | | | | | The state (aka idmap_tdb2_alloc_context) is being removed. The (global) idmap script was wrong there anyways. It belongs to the per-domain context.
* s3:idmap_tdb2: remove use of idmap_tdb2_state from idmap_tdb2_allocate_idMichael Adam2010-08-141-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.
* s3:idmap_tdb2: move definition of struct idmap_tdb2_context up.Michael Adam2010-08-141-4/+5
|
* s3:idmap_tdb2: open the db after loading the ranges in idmap_tdb2_db_init().Michael Adam2010-08-141-3/+5
|
* s3:idmap_tdb2: add allocation of new mappings to idmap_tdb2_sids_to_unixidsMichael Adam2010-08-141-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!).
* s3:idmap_tdb2: re-implement allocated_id in idmap methods.Michael Adam2010-08-141-0/+1
|
* s3:idmap_tdb2: remove unused idmap_tdb2_alloc_init().Michael Adam2010-08-141-12/+0
|
* s3:idmap_tdb2: remove unused idmap_tdb2_alloc_close().Michael Adam2010-08-141-9/+0
|
* s3:idmap_tdb2: remove unused idmap_alloc_methods.Michael Adam2010-08-141-6/+0
|
* s3:idmap_tdb2: don't call smb_register_idmap_alloc() in idmap_tdb2_initMichael Adam2010-08-141-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.
* s3:idmap: remove the set_mapping method from the idmap APIMichael Adam2010-08-141-1/+0
|
* s3:idmap: remove unused method set_id_hwm from idmap APIMichael Adam2010-08-141-12/+0
| | | | Michael
* s3:idmap: remove unused alloc method get_id_hwm from idmap APIMichael Adam2010-08-141-49/+0
| | | | Michael
* s3:idmap: remove unused method dump_data() from the idmap APIMichael Adam2010-08-141-11/+0
| | | | Michael
* s3:idmap: remove the remove_mapping method from API and backendsMichael Adam2010-08-141-12/+0
| | | | Michael
* s3:idmap_tdb2: fix a debug messageMichael Adam2010-08-141-1/+1
|
* s3:winbind:idmap_tdb2_set_mapping: untangle assignment from checkMichael Adam2010-05-201-1/+2
|
* s3: range-check idmap script outputVolker Lendecke2010-04-291-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.
* s3: Fix an uninitialized variable in idmap_tdb2_sid_to_id()Volker Lendecke2010-04-291-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.
* s3: Fix some nonempty blank linesVolker Lendecke2010-04-291-14/+14
|
* s3-idmap: fix two uninitialized variable warnings in idmap_tdb2.Günther Deschner2009-08-201-3/+3
| | | | Guenther
* s3:winbind: use transaction in idmap_tdb2_allocate_id_action().Michael Adam2009-07-291-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
* s3:dbwrap: change dbwrap_change_uint32_atomic() to return NTSTATUS not uint32_t.Michael Adam2009-07-291-4/+2
| | | | Michael
* s3:winbind: in idmap_tdb2_sid_to_id(), use transaction wrapped stores.Michael Adam2009-07-291-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
* s3:winbind: in idmap_tdb2_id_to_sid(), use transaction wrapped stores.Michael Adam2009-07-291-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
* s3:winbind: use transaction wrapper in idmap_tdb2_allocate_id()Michael Adam2009-07-291-43/+69
| | | | Michael
* s3:winbind: use transaction wrapper in idmap_tdb2_set_mapping()Michael Adam2009-07-291-49/+55
| | | | Michael
* s3:idmap_tdb2: filter out of range mappings in default idmap configMichael Adam2009-05-271-12/+49
| | | | | | This fixes bug #6416 Michael
* More fix to initialize idmap statusesBo Yang2009-03-021-0/+10
|
* s3:idmap_tdb2: untangle assignment and check in idmap_tdb2_alloc_load()Michael Adam2009-02-061-6/+4
| | | | Michael
* s3:idmap_tdb2: factor lodaing of ranges out into idmap_tdb2_load_ranges()Michael Adam2009-02-061-25/+41
| | | | Michael
* s3:idmap_tdb2: move together code that belongs together in idmap_tdb2_alloc_loadMichael Adam2009-02-061-7/+8
| | | | Michael
* s3:idmap_tdb2: streamline idmap_tdb2_sid_to_id,Michael Adam2009-02-061-6/+7
| | | | | | adding tmp talloc ctx and removing a variable Michael
* removed unused variablesAndrew Tridgell2008-09-291-2/+1
|
* fixed segv on startup with trusted domainsAndrew Tridgell2008-09-291-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
* use transactions in idmap_tdb2Andrew Tridgell2008-08-131-18/+42
| | | | (This used to be commit 32b8db27652a66a2ade547a6d27f34d0816f7296)
* got rid of the redundent cache databaseAndrew Tridgell2008-08-131-134/+28
| | | | (This used to be commit 126f4ac8e85458ee4693b89a184b99420f1b6bee)
* idmap tdb2: fix inconsistent mappings by checking for race and retrying to ↵Michael Adam2008-08-131-57/+13
| | | | | | | fetch mapping. Michael (This used to be commit cb4c74c9c206e5a445ca636fa6562ce721ea5839)
* idmap tdb2: fix broken logic in tdb2_delete_bystring().Michael Adam2008-08-131-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)
* idmap tdb2: fix broken logic in tdb2_store_bystring().Michael Adam2008-08-131-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)
* Remove "idmap alloc config : range" parameterVolker Lendecke2008-08-121-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)
* idmap rewriteVolker Lendecke2008-08-121-26/+2
| | | | (This used to be commit 30a180f2fce8cf6a3e5548f6bba453272ba70b33)
* Revert "Fix nonempty whitespace only lines"Volker Lendecke2008-07-111-14/+14
| | | | | This reverts commit cc77db2acbc35cea58576f1e28c7a760a5e31609. (This used to be commit ed5b516c2027d78011cdaa7cbbc01bb01e766381)
* Fix nonempty whitespace only linesVolker Lendecke2008-07-021-14/+14
| | | | (This used to be commit cc77db2acbc35cea58576f1e28c7a760a5e31609)
* Convert old sid-string handling in idmap_tdb2 to a new oneAlexander Bokovoy2008-01-161-4/+7
| | | | (This used to be commit ee851730cef1eb506b47faf57e25789ad3c6aafa)
* idmap TDB2 backend, used for clustered Samba setups.Alexander Bokovoy2008-01-161-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)