1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-29 21:47:30 +03:00

26 Commits

Author SHA1 Message Date
Günther Deschner
77a0a6e9a1 s3-idmap: fix two uninitialized variable warnings in idmap_tdb2.
Guenther
2009-08-20 15:29:16 +02:00
Michael Adam
bd34de10bc s3:winbind: use transaction in idmap_tdb2_allocate_id_action().
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-29 16:26:25 +02:00
Michael Adam
ded0ce8345 s3:dbwrap: change dbwrap_change_uint32_atomic() to return NTSTATUS not uint32_t.
Michael
2009-07-29 16:26:21 +02:00
Michael Adam
d916e56c4c s3:winbind: in idmap_tdb2_sid_to_id(), use transaction wrapped stores.
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-29 16:26:20 +02:00
Michael Adam
a9bea871c9 s3:winbind: in idmap_tdb2_id_to_sid(), use transaction wrapped stores.
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-29 16:26:20 +02:00
Michael Adam
9e20e178b3 s3:winbind: use transaction wrapper in idmap_tdb2_allocate_id()
Michael
2009-07-29 16:26:19 +02:00
Michael Adam
ab7a7be5d4 s3:winbind: use transaction wrapper in idmap_tdb2_set_mapping()
Michael
2009-07-29 16:26:12 +02:00
Michael Adam
e12670a105 s3:idmap_tdb2: filter out of range mappings in default idmap config
This fixes bug #6416

Michael
2009-05-27 19:31:33 +02:00
Bo Yang
deb73e87b2 More fix to initialize idmap statuses 2009-03-02 15:51:55 -08:00
Michael Adam
2c1d980abe s3:idmap_tdb2: untangle assignment and check in idmap_tdb2_alloc_load()
Michael
2009-02-06 10:20:08 +01:00
Michael Adam
e0f91c8930 s3:idmap_tdb2: factor lodaing of ranges out into idmap_tdb2_load_ranges()
Michael
2009-02-06 10:20:08 +01:00
Michael Adam
2125777803 s3:idmap_tdb2: move together code that belongs together in idmap_tdb2_alloc_load
Michael
2009-02-06 10:20:08 +01:00
Michael Adam
30d08223e6 s3:idmap_tdb2: streamline idmap_tdb2_sid_to_id,
adding tmp talloc ctx and removing a variable

Michael
2009-02-06 10:20:07 +01:00
Andrew Tridgell
a93dc2c858 removed unused variables 2008-09-29 14:01:00 +02:00
Andrew Tridgell
b8c9daac6e fixed segv on startup with trusted domains
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-09-29 14:01:00 +02:00
Andrew Tridgell
4d76ed4f38 use transactions in idmap_tdb2
(This used to be commit 32b8db27652a66a2ade547a6d27f34d0816f7296)
2008-08-13 11:54:09 +02:00
Andrew Tridgell
9c79d1c23e got rid of the redundent cache database
(This used to be commit 126f4ac8e85458ee4693b89a184b99420f1b6bee)
2008-08-13 11:54:08 +02:00
Michael Adam
620d873183 idmap tdb2: fix inconsistent mappings by checking for race and retrying to fetch mapping.
Michael
(This used to be commit cb4c74c9c206e5a445ca636fa6562ce721ea5839)
2008-08-13 11:54:08 +02:00
Michael Adam
134ea91278 idmap tdb2: fix broken logic in tdb2_delete_bystring().
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-13 11:54:07 +02:00
Michael Adam
6afa8e573e idmap tdb2: fix broken logic in tdb2_store_bystring().
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-13 11:54:07 +02:00
Volker Lendecke
2a3698e5c0 Remove "idmap alloc config : range" parameter
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-12 11:28:29 +02:00
Volker Lendecke
340ab6a256 idmap rewrite
(This used to be commit 30a180f2fce8cf6a3e5548f6bba453272ba70b33)
2008-08-12 11:28:29 +02:00
Volker Lendecke
0439d4ba61 Revert "Fix nonempty whitespace only lines"
This reverts commit cc77db2acbc35cea58576f1e28c7a760a5e31609.
(This used to be commit ed5b516c2027d78011cdaa7cbbc01bb01e766381)
2008-07-11 17:53:25 +02:00
Volker Lendecke
e467fae948 Fix nonempty whitespace only lines
(This used to be commit cc77db2acbc35cea58576f1e28c7a760a5e31609)
2008-07-02 15:04:46 +02:00
Alexander Bokovoy
024741500a Convert old sid-string handling in idmap_tdb2 to a new one
(This used to be commit ee851730cef1eb506b47faf57e25789ad3c6aafa)
2008-01-16 16:50:46 +03:00
Alexander Bokovoy
3bd3483fab idmap TDB2 backend, used for clustered Samba setups.
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)
2008-01-16 12:27:29 +03:00