summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-02-17tdb: use tdb_nest_lock() for seqnum lock.Rusty Russell1-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>
2010-02-24tdb: use tdb_nest_lock() for active lock.Rusty Russell2-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>
2010-02-22tdb: use tdb_nest_lock() for open lock.Rusty Russell3-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>
2010-02-17tdb: use tdb_nest_lock() for transaction lock.Rusty Russell2-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>
2010-02-17tdb: cleanup: find_nestlock() helper.Rusty Russell1-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>
2010-02-24tdb: cleanup: tdb_release_extra_locks() helperRusty Russell3-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>
2010-02-17tdb: cleanup: tdb_have_extra_locks() helperRusty Russell4-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>
2010-02-17tdb: don't suppress the transaction lock because of the allrecord lock.Rusty Russell1-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>
2010-02-17tdb: cleanup: tdb_nest_lock/tdb_nest_unlockRusty Russell3-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>
2010-02-17tdb: cleanup: rename global_lock to allrecord_lock.Rusty Russell5-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>
2010-02-17tdb: cleanup: rename GLOBAL_LOCK to OPEN_LOCK.Rusty Russell3-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>
2010-02-24tdb: make _tdb_transaction_cancel static.Rusty Russell2-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>
2010-02-17tdb: cleanup: split brlock and brunlock methods.Rusty Russell7-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>
2010-02-24s4/schema: Move msDS-IntId implementation to samldb.c moduleKamen Mazdrashki2-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>
2010-02-23s4/torture/smb2: Add two new SMB2 compound testsSteven Danneman1-0/+157
These tests server behavior when a client compounds both synchronous and asynchronous requests.
2010-02-23s4:cleanup remove unused schannel ldb codeSimo Sorce3-406/+0
2010-02-23s4:schannel merge code with s3Simo Sorce6-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.
2010-02-23schannel_tdb: make code compilable in both treesSimo Sorce4-54/+104
2010-02-23s3:schannel streamline interfaceSimo Sorce8-201/+191
Make calling schannel much easier by removing the need to explicitly open the database. Let the abstraction do it instead.
2010-02-23s3:schannel fix memory hierarchySimo Sorce1-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.
2010-02-23schannel: merge header filesSimo Sorce2-48/+34
One almost empty header file was simply including another not included by anything else. Just merge them together.
2010-02-23s4:schannel more readable check logicSimo Sorce3-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
2010-02-23s3:schannel more readable check logicSimo Sorce3-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)
2010-02-23s3 move the sitename cache in its own fileSimo Sorce11-117/+172
2010-02-23s3: Consolidate some pid_to_procid() calls to procid_self()Volker Lendecke2-7/+7
2010-02-23s3: re-run make samba3-idl.Günther Deschner2-54/+56
Guenther
2010-02-23spoolss: some fixes for devicemode dm extra structs.Günther Deschner1-10/+2
Guenther
2010-02-23s3: re-run make samba3-idl.Günther Deschner3-0/+675
Guenther
2010-02-23spoolss: add various DM extradata formats (including PostScript and UniDriver).Günther Deschner1-0/+307
Guenther
2010-02-23s3:spoolss: construct the devmode the same way for level 2 and 8Stefan Metzmacher1-17/+3
metze
2010-02-23s3:cli_netlogon: keep the the correct negotiate_flags on the cli->dc structureStefan Metzmacher1-2/+6
This should fix the rpccli_netlogon_set_trust_password() against DC's without netr_ServerPasswordSet2 support. This fixes bug #7160. metze
2010-02-23s3:selftest: $WORKGROUP doesn't exist, we should use $DOMAINStefan Metzmacher1-1/+1
metze
2010-02-23s3: Consolidate server_id_self into the equivalent procid_self()Volker Lendecke13-17/+11
2010-02-23s3: add explicit configure option whether or not to enable dmapi supportBjörn Jacke1-2/+23
2010-02-23tstream: Added a typedef for the function prototype.Andreas Schneider2-9/+19
2010-02-23s4-smb: Migrate named_pipe_server to tsocket.Andreas Schneider2-211/+279
2010-02-23s4-selftest: disable rndc and dns update in build farmAndrew Tridgell1-1/+2
2010-02-23s4-dns: improved logging, and run name check at startupAndrew Tridgell1-6/+10
2010-02-23s4-pyglue: added interface_ips() callAndrew Tridgell1-0/+43
This allows a python script to query the internal network interface lists from Samba
2010-02-23s4-dns: call out to the dns update command every 10 minutesAndrew Tridgell1-26/+112
This periodically calls samba_dnsupdate to update our DNS entries if needed
2010-02-23s4-param: added "dns update command" smb.conf optionAndrew Tridgell2-0/+5
defaults to SBINDIR/samba_dnsupdate This command will do periodic dynamic DNS updates using TSIG-GSS
2010-02-23s4-config: add dyn_SBINDIRAndrew Tridgell3-0/+5
2010-02-23libreplace: Remove the obsolete signal type cast.Andreas Schneider3-13/+4
AC_SIGNAL_TYPE is already obsolete in autoconf. C89 requires signal handlers to return void, only K&R returned int.
2010-02-23libutil: Remove obsolete signal type cast.Andreas Schneider1-5/+5
2010-02-23s4-smbd: Remove obsolete singal type cast from the thread process model.Andreas Schneider1-3/+3
2010-02-23s3-smb: Remove the obsolete signal type cast.Andreas Schneider1-4/+0
AC_SIGNAL_TYPE is already obsolete in autoconf. C89 requires signal handlers to return void, only K&R returned int.
2010-02-23s3-lib: Remove obsolete signal type cast.Andreas Schneider3-12/+12
2010-02-23s3-libads: Remove obsolete signal type cast.Andreas Schneider1-5/+5
2010-02-23s3-nmbd: Remove obsolete signal type cast.Andreas Schneider3-7/+7
2010-02-23s3-pam_smbpass: Remove obsolete signal type cast.Andreas Schneider3-21/+21