summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* tdb: cleanup: always grab allrecord lock to infinity.Rusty Russell2010-02-241-7/+3
| | | | | | | | | | | We were previously inconsistent with our "global" lock: the transaction code grabbed it from FREELIST_TOP to end of file, and the rest of the code grabbed it from FREELIST_TOP to end of the hash chains. Change it to always grab to end of file for simplicity and so we can merge the two. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* tdb: remove num_locksRusty Russell2010-02-172-11/+2
| | | | | | | | | | | This was redundant before this patch series: it mirrored num_lockrecs exactly. It still does. Also, skip useless branch when locks == 1: unconditional assignment is cheaper anyway. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* tdb: use tdb_nest_lock() for seqnum lock.Rusty Russell2010-02-171-3/+3
| | | | | | | | This is pure overhead, but it centralizes the locking. Realloc (esp. as most implementations are lazy) is fast compared to the fnctl anyway. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* tdb: use tdb_nest_lock() for active lock.Rusty Russell2010-02-242-5/+18
| | | | | | | | | | Use our newly-generic nested lock tracking for the active lock. Note that the tdb_have_extra_locks() and tdb_release_extra_locks() functions have to skip over this lock now it is tracked. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* tdb: use tdb_nest_lock() for open lock.Rusty Russell2010-02-223-15/+10
| | | | | | | | | | | | This never nests, so it's overkill, but it centralizes the locking into lock.c and removes the ugly flag in the transaction code to track whether we have the lock or not. Note that we have a temporary hack so this places a real lock, despite the fact that we are in a transaction. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* tdb: use tdb_nest_lock() for transaction lock.Rusty Russell2010-02-172-32/+23
| | | | | | | | | | | Rather than a boutique lock and a separate nest count, use our newly-generic nested lock tracking for the transaction lock. Note that the tdb_have_extra_locks() and tdb_release_extra_locks() functions have to skip over this lock now it is tracked. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* tdb: cleanup: find_nestlock() helper.Rusty Russell2010-02-171-28/+23
| | | | | | | | Factor out two loops which find locks; we are going to introduce a couple more so a helper makes sense. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* tdb: cleanup: tdb_release_extra_locks() helperRusty Russell2010-02-243-17/+22
| | | | | | | | Move locking intelligence back into lock.c, rather than open-coding the lock release in transaction.c. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* tdb: cleanup: tdb_have_extra_locks() helperRusty Russell2010-02-174-5/+17
| | | | | | | | | | In many places we check whether locks are held: add a helper to do this. The _tdb_lockall() case has already checked for the allrecord lock, so the extra work done by tdb_have_extra_locks() is merely redundant. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* tdb: don't suppress the transaction lock because of the allrecord lock.Rusty Russell2010-02-171-6/+0
| | | | | | | | | | | | | | | | | | | tdb_transaction_lock() and tdb_transaction_unlock() do nothing if we hold the allrecord lock. However, the two locks don't overlap, so this is wrong. This simplification makes the transaction lock a straight-forward nested lock. There are two callers for these functions: 1) The transaction code, which already makes sure the allrecord_lock isn't held. 2) The traverse code, which wants to stop transactions whether it has the allrecord lock or not. There have been deadlocks here before, however this should not bring them back (I hope!) Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* tdb: cleanup: tdb_nest_lock/tdb_nest_unlockRusty Russell2010-02-173-45/+67
| | | | | | | | | | | | | | | | | | | Because fcntl locks don't nest, we track them in the tdb->lockrecs array and only place/release them when the count goes to 1/0. We only do this for record locks, so we simply place the list number (or -1 for the free list) in the structure. To generalize this: 1) Put the offset rather than list number in struct tdb_lock_type. 2) Rename _tdb_lock() to tdb_nest_lock, make it non-static and move the allrecord check out to the callers (except the mark case which doesn't care). 3) Rename _tdb_unlock() to tdb_nest_unlock(), make it non-static and move the allrecord out to the callers (except mark again). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* tdb: cleanup: rename global_lock to allrecord_lock.Rusty Russell2010-02-175-29/+29
| | | | | | | | | | The word global is overloaded in tdb. The global_lock inside struct tdb_context is used to indicate we hold a lock across all the chains. Rename it to allrecord_lock. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* tdb: cleanup: rename GLOBAL_LOCK to OPEN_LOCK.Rusty Russell2010-02-173-17/+17
| | | | | | | | | | | The word global is overloaded in tdb. The GLOBAL_LOCK offset is used at open time to serialize initialization (and by the transaction code to block open). Rename it to OPEN_LOCK. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* tdb: make _tdb_transaction_cancel static.Rusty Russell2010-02-242-2/+1
| | | | | | | | Now tdb_open() calls tdb_transaction_cancel() instead of _tdb_transaction_cancel, we can make it static. Signed-off-by: Rusty Russell<rusty@rustcorp.com.au>
* tdb: cleanup: split brlock and brunlock methods.Rusty Russell2010-02-177-117/+235
| | | | | | | | | | | | | | | | | | This is taken from the CCAN code base: rather than using tdb_brlock for locking and unlocking, we split it into brlock and brunlock functions. For extra debugging information, brunlock says what kind of lock it is unlocking (even though fnctl locks don't need this). This requires an extra argument to tdb_transaction_unlock() so we know whether the lock was upgraded to a write lock or not. We also use a "flags" argument tdb_brlock: 1) TDB_LOCK_NOWAIT replaces lck_type = F_SETLK (vs F_SETLKW). 2) TDB_LOCK_MARK_ONLY replaces setting TDB_MARK_LOCK bit in ltype. 3) TDB_LOCK_PROBE replaces the "probe" argument. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* s4/schema: Move msDS-IntId implementation to samldb.c moduleKamen Mazdrashki2010-02-242-149/+87
| | | | | | | | msDS-IntId attribute should be replicated, so it must be implemented in a module that is before repl_meta_data module (thanks abartlet for pointing this out). Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s4/torture/smb2: Add two new SMB2 compound testsSteven Danneman2010-02-231-0/+157
| | | | | These tests server behavior when a client compounds both synchronous and asynchronous requests.
* s4:cleanup remove unused schannel ldb codeSimo Sorce2010-02-233-406/+0
|
* s4:schannel merge code with s3Simo Sorce2010-02-236-51/+22
| | | | | | | | | | | | | | | | | After looking at the s4 side of the (s)channel :) I found out that it makes more sense to simply make it use the tdb based code than redo the same changes done to s3 to simplify the interface. Ldb is slow, to the point it needs haks to pre-open the db to speed it up, yet that does not solve the lookup speed, with ldb it is always going to be slower. Looking through the history it is evident that the schannel database doesn't really need greate expanadability. And lookups are always done with a single Key. This seem a perfet fit for tdb while ldb looks unnecessarily complicated. The schannel database is not really a persistent one. It can be discared during an upgrade without causing any real issue. all it contains is temproary session data.
* schannel_tdb: make code compilable in both treesSimo Sorce2010-02-234-54/+104
|
* s3:schannel streamline interfaceSimo Sorce2010-02-238-201/+191
| | | | | Make calling schannel much easier by removing the need to explicitly open the database. Let the abstraction do it instead.
* s3:schannel fix memory hierarchySimo Sorce2010-02-231-1/+1
| | | | | | | passing mem_ctx was causing creds->sid to be allocated on mem_ctx and not be child of creds as expected. When later in schannel_check_creds_state() we stole the creds on a different memory context the sid was left behind and the memory it points to freed when the temporary context was freed.
* schannel: merge header filesSimo Sorce2010-02-232-48/+34
| | | | | One almost empty header file was simply including another not included by anything else. Just merge them together.
* s4:schannel more readable check logicSimo Sorce2010-02-233-24/+44
| | | | | | | | Make the initial schannel check logic more understandable. Make it easy to define different policies depending on the caller's security requirements (Integrity/Privacy/Both/None) This is the same change applied to s3
* s3:schannel more readable check logicSimo Sorce2010-02-233-22/+39
| | | | | | Make the initial schannel check logic more understandable. Make it easy to define different policies depending on ther caller's security requirements (Integrity/Privacy/Both/None)
* s3 move the sitename cache in its own fileSimo Sorce2010-02-2311-117/+172
|
* s3: Consolidate some pid_to_procid() calls to procid_self()Volker Lendecke2010-02-232-7/+7
|
* s3: re-run make samba3-idl.Günther Deschner2010-02-232-54/+56
| | | | Guenther
* spoolss: some fixes for devicemode dm extra structs.Günther Deschner2010-02-231-10/+2
| | | | Guenther
* s3: re-run make samba3-idl.Günther Deschner2010-02-233-0/+675
| | | | Guenther
* spoolss: add various DM extradata formats (including PostScript and UniDriver).Günther Deschner2010-02-231-0/+307
| | | | Guenther
* s3:spoolss: construct the devmode the same way for level 2 and 8Stefan Metzmacher2010-02-231-17/+3
| | | | metze
* s3:cli_netlogon: keep the the correct negotiate_flags on the cli->dc structureStefan Metzmacher2010-02-231-2/+6
| | | | | | | | | This should fix the rpccli_netlogon_set_trust_password() against DC's without netr_ServerPasswordSet2 support. This fixes bug #7160. metze
* s3:selftest: $WORKGROUP doesn't exist, we should use $DOMAINStefan Metzmacher2010-02-231-1/+1
| | | | metze
* s3: Consolidate server_id_self into the equivalent procid_self()Volker Lendecke2010-02-2313-17/+11
|
* s3: add explicit configure option whether or not to enable dmapi supportBjörn Jacke2010-02-231-2/+23
|
* tstream: Added a typedef for the function prototype.Andreas Schneider2010-02-232-9/+19
|
* s4-smb: Migrate named_pipe_server to tsocket.Andreas Schneider2010-02-232-211/+279
|
* s4-selftest: disable rndc and dns update in build farmAndrew Tridgell2010-02-231-1/+2
|
* s4-dns: improved logging, and run name check at startupAndrew Tridgell2010-02-231-6/+10
|
* s4-pyglue: added interface_ips() callAndrew Tridgell2010-02-231-0/+43
| | | | | This allows a python script to query the internal network interface lists from Samba
* s4-dns: call out to the dns update command every 10 minutesAndrew Tridgell2010-02-231-26/+112
| | | | | This periodically calls samba_dnsupdate to update our DNS entries if needed
* s4-param: added "dns update command" smb.conf optionAndrew Tridgell2010-02-232-0/+5
| | | | | | defaults to SBINDIR/samba_dnsupdate This command will do periodic dynamic DNS updates using TSIG-GSS
* s4-config: add dyn_SBINDIRAndrew Tridgell2010-02-233-0/+5
|
* libreplace: Remove the obsolete signal type cast.Andreas Schneider2010-02-233-13/+4
| | | | | AC_SIGNAL_TYPE is already obsolete in autoconf. C89 requires signal handlers to return void, only K&R returned int.
* libutil: Remove obsolete signal type cast.Andreas Schneider2010-02-231-5/+5
|
* s4-smbd: Remove obsolete singal type cast from the thread process model.Andreas Schneider2010-02-231-3/+3
|
* s3-smb: Remove the obsolete signal type cast.Andreas Schneider2010-02-231-4/+0
| | | | | AC_SIGNAL_TYPE is already obsolete in autoconf. C89 requires signal handlers to return void, only K&R returned int.
* s3-lib: Remove obsolete signal type cast.Andreas Schneider2010-02-233-12/+12
|
* s3-libads: Remove obsolete signal type cast.Andreas Schneider2010-02-231-5/+5
|