summaryrefslogtreecommitdiffstats
path: root/source/locking/brlock.c
Commit message (Collapse)AuthorAgeFilesLines
* r22650: sync up with SMABA_3_0_25 as of svn r22649Gerald Carter2007-05-031-3/+8
|
* r21889: * Pull from SAMBA-3_0_25 svn r21888Gerald Carter2007-03-201-0/+3
| | | | * Set version to 3.0.25pre2
* r21585: Start syncing the monster that will become 3.0.25pre1Gerald Carter2007-02-281-189/+335
| | | | | | | | Still todo: * release notes * few minor outstanding patches * additional idmap man pages
* r17094: merge fixes for 3.0.23aGerald Carter2006-07-171-10/+9
|
* r15837: starting sync up for 3.0.23rc1 (in sync with SAMBA_3_0 r15822)Gerald Carter2006-05-231-4/+105
|
* r15083: Using talloc with destructors is nice and all, but in thisJeremy Allison2006-04-131-9/+5
| | | | | | | case it's in a performace critical path and it *hurts* us. Go back to plain malloc/free with an explicit destructor call. Jeremy.
* r15060: The brlock code gets called a lot. Ensure we keep theJeremy Allison2006-04-121-29/+13
| | | | | | key around while we're using it - saves many calls to locking_key() (now deleted). Jeremy.
* r15026: Fix warning until POSIX locking finished.Jeremy Allison2006-04-101-2/+1
| | | | Jeremy.
* r15018: Merge Volker's ipc/trans2/nttrans changes overJeremy Allison2006-04-101-315/+985
| | | | | | | | into 3.0. Also merge the new POSIX lock code - this is not enabled unless -DDEVELOPER is defined. This doesn't yet map onto underlying system POSIX locks. Updates vfs to allow lock queries. Jeremy.
* r14763: Add a new tuning parameter, open files database hash size,Jeremy Allison2006-03-291-2/+4
| | | | | | | | | this allows us to experiment with ensuring the tdb hash size for our open files and locking db are appropriately sized. Make the hash size larger by default (10007 instead of 1049) and make the locking db hash size the same as the open file db hash size. Jeremy.
* r13915: Fixed a very interesting class of realloc() bugs found by Coverity.Jeremy Allison2006-03-071-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | realloc can return NULL in one of two cases - (1) the realloc failed, (2) realloc succeeded but the new size requested was zero, in which case this is identical to a free() call. The error paths dealing with these two cases should be different, but mostly weren't. Secondly the standard idiom for dealing with realloc when you know the new size is non-zero is the following : tmp = realloc(p, size); if (!tmp) { SAFE_FREE(p); return error; } else { p = tmp; } However, there were *many* *many* places in Samba where we were using the old (broken) idiom of : p = realloc(p, size) if (!p) { return error; } which will leak the memory pointed to by p on realloc fail. This commit (hopefully) fixes all these cases by moving to a standard idiom of : p = SMB_REALLOC(p, size) if (!p) { return error; } Where if the realloc returns null due to the realloc failing or size == 0 we *guarentee* that the storage pointed to by p has been freed. This allows me to remove a lot of code that was dealing with the standard (more verbose) method that required a tmp pointer. This is almost always what you want. When a realloc fails you never usually want the old memory, you want to free it and get into your error processing asap. For the 11 remaining cases where we really do need to keep the old pointer I have invented the new macro SMB_REALLOC_KEEP_OLD_ON_ERROR, which can be used as follows : tmp = SMB_REALLOC_KEEP_OLD_ON_ERROR(p, size); if (!tmp) { SAFE_FREE(p); return error; } else { p = tmp; } SMB_REALLOC_KEEP_OLD_ON_ERROR guarentees never to free the pointer p, even on size == 0 or realloc fail. All this is done by a hidden extra argument to Realloc(), BOOL free_old_on_error which is set appropriately by the SMB_REALLOC and SMB_REALLOC_KEEP_OLD_ON_ERROR macros (and their array counterparts). It remains to be seen what this will do to our Coverity bug count :-). Jeremy.
* r10656: BIG merge from trunk. Features not copied overGerald Carter2005-09-301-12/+12
| | | | | | | * \PIPE\unixinfo * winbindd's {group,alias}membership new functions * winbindd's lookupsids() functionality * swat (trunk changes to be reverted as per discussion with Deryck)
* r6502: add LOCKING debug class - pull PRINTINGDB class definition from trunkHerb Lewis2005-04-271-0/+3
| | | | so our numbers don't get out of sync
* r5634: Fix 64-bit overflow problems found by BlueArc torture tester.Jeremy Allison2005-03-031-9/+0
| | | | | | We still have a few strange bugs with 64-bit locking values. I will get traces. Jeremy.
* r4108: As check_self is *always* False in every invokation, remove theJeremy Allison2004-12-091-11/+6
| | | | | logic for it. We still pass Samba4 RAW-LOCK test. Jeremy.
* r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison2004-12-071-1/+1
| | | | | | | | | allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy.
* r3050: Steal from Samba4 :-). Make us pass most of the new lock tests ↵Jeremy Allison2004-10-181-17/+56
| | | | | | | (except for the cancel lock which I have to add). Jeremy.
* r3008: when checking for the existance of a lock we are only doing a singleAndrew Tridgell2004-10-171-3/+0
| | | | | tdb call, so there is no need to get the chainlock. This reduces the number of tdb locking calls made on file IO
* r1011: fix bad merge (from a few months ago) and ensure that we always use ↵Gerald Carter2004-06-041-2/+2
| | | | tdb_open_log() instead of tdb_open_ex()
* r2: import HEAD into svn+ssh://svn.samba.org/home/svn/samba/trunkCVS Import User2004-04-041-0/+714
metze