summaryrefslogtreecommitdiffstats
path: root/source/locking
Commit message (Collapse)AuthorAgeFilesLines
* the next stage in the NTSTATUS/WERROR change. smbd and nmbd now compile, but ↵Andrew Tridgell2001-09-041-6/+6
| | | | the client code still needs some work
* converted another bunch of stuff to NTSTATUSAndrew Tridgell2001-08-271-1/+1
|
* started converting NTSTATUS to be a structure on systems with gcc in order ↵Andrew Tridgell2001-08-271-6/+6
| | | | to make it type incompatible with BOOL so we catch errors sooner. This has already found a number of bugs
* converted smbd to use NTSTATUS by defaultAndrew Tridgell2001-08-272-33/+73
| | | | | | | | | | | | | | | | major changes include: - added NSTATUS type - added automatic mapping between dos and nt error codes - changed all ERROR() calls to ERROR_DOS() and many to ERROR_NT() these calls auto-translate to the client error code system - got rid of the cached error code and the writebmpx code We eventually will need to also: - get rid of BOOL, so we don't lose error info - replace all ERROR_DOS() calls with ERROR_NT() calls but that is too much for one night
* Ignore locks of length zero as they mean different things in Win32Jeremy Allison2001-08-261-5/+18
| | | | | and POSIX. Jeremy.
* Don't use CLEAR_IF_FIRST if opening read-only.Jeremy Allison2001-08-261-1/+1
| | | | Jeremy.
* we now have all but the dreaded 0/0 lock workingAndrew Tridgell2001-08-241-30/+67
|
* 0 byte lock ranges ARE validAndrew Tridgell2001-08-241-6/+3
|
* Tidyup fixes for fcntl spin problem.Jeremy Allison2001-08-221-11/+30
| | | | Jeremy.
* Fixed the (incorrect) paranioa fix I put in for the fcntl lock spin.Jeremy Allison2001-08-221-17/+35
| | | | | | Don't delete a share mode that failed to remove the oplock (doh!), just set the oplock entry to zero.... Jeremy.
* Missed uninitialized variable return for del_share_mode().Jeremy Allison2001-08-211-1/+1
| | | | Jeremy.
* This is Jeremy pretending to be Volker, 'cos theVolker Lendecke2001-08-211-64/+136
| | | | | | | | | | | | | | | | | link from Seattle is having problems. I've added 3 things here to work on the fcntl spin problem. 1). Check *all* tdb return codes... :-). 2). If we're asking ourselves to break an oplock, and we can't find a fsp pointer that matches the entry, this is a *logic bug* and we should abort and panic so someone with gdb can pick up the pieces. 3). After we've broken an oplock, ensure that the entry itself has been removed, and if not remove it ourselves. This should not be neccessary in a correctly working environmen,t, but will provide an added layer of robustness in error situations. 4). I hate german keyboards :-) :-). Jeremy.
* Ensure we are very explicit about what we're comparing whenJeremy Allison2001-08-201-4/+4
| | | | | | | we're comparing structures (ie. don't just do a memcmp). I don't think this will fix the fcntl spin issue, but it's a "just in case" change. Jeremy.
* Add printing of errno when POSIX lock requests fail.Jeremy Allison2001-08-131-3/+3
| | | | Jeremy.
* this is a big global fix for the ptr = Realloc(ptr, size) bug.Simo Sorce2001-08-122-6/+13
| | | | | | many possible mem leaks, and segfaults fixed. someone should port this fix to 2.2 also.
* Added "use mmap" for HPUX.Jeremy Allison2001-07-302-2/+2
| | | | Jeremy.
* Fixed the nastiest locking bug to track down.... smb_pids are sent in theJeremy Allison2001-07-022-7/+6
| | | | | lockingX calls - use that instead of smb_pid in the packet. Jeremy.
* Ensure we return correct error on trying to unlock a region not locked.Jeremy Allison2001-06-301-2/+2
| | | | Jeremy.
* Fixed the first locking error (test #8 found by locktest code fromJeremy Allison2001-06-302-6/+45
| | | | | Clarion locktest. Jeremy.
* use LDSHFLAGS not -shared in several placesAndrew Tridgell2001-06-043-4/+4
|
* Stupid typo. Should be if (!tdb).Jeremy Allison2001-05-231-1/+1
| | | | Jeremy.
* Defensive brlock and locking database cleaning code.Jeremy Allison2001-05-222-8/+124
| | | | Jeremy.
* Merge of Andrew's changes in 2.2.Jeremy Allison2001-04-131-3/+1
| | | | Jeremy.
* This is a big, rather ugly patch. Whilst investigating the files not truncatedJeremy Allison2001-03-301-32/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | when copying to a full disk problem, I discovered that we were not allowing the delete on close flag to be set properly, this led to other things, and after investigation of the proper delete on close semantics and their relationship to the file_share_delete flag I discovered there were some cases where we weren't doing the deny modes properly. And this after only 5 years working on them..... :-) :-). So here's the latest attempt. I realised the delete on close flag needs to be set across all smbds with a dev/ino pair open - in addition, the delete on close flag, allow share delete and delete access requested all need to be stored in the share mode tdb. The "delete_on_close" entry in the fsp struct is now redundant and should really be removed. This may also mean we can get rid of the "iterate_fsp" calls that I didn't like adding in the first place. Whilst doing this patch, I also discovered we needed to do the se_map_generic() call for file opens and POSIX ACL mapping, so I added that also. This code, although ugly, now passes the deny mode torture tests plus the delete on close tests I added. I do need to add one more multiple connection delete on close test to make sure I got the semantics exactly right, plus we should also (as Andrew suggested) move to random testing here. The good news is that NT should now correctly delete the file on disk full error when copying to a disk :-). Jeremy.
* Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMRJeremy Allison2001-03-112-9/+4
| | | | | | RPC code to merge with new passdb code. Currently rpcclient doesn't compile. I'm working on it... Jeremy.
* tdb_unlockchain() no longer returns a valueTim Potter2000-12-061-4/+4
|
* Changed to sourceforge tdb code. This includes spinlocks (so we now haveJeremy Allison2000-12-062-17/+17
| | | | | | | | a --with-spinlocks option to configure, this does mean the on-disk tdb format has changed, so 2.2alphaX sites will need to re-create their tdb's. The upside is no more tdb fragmentation and a +5% on netbench. Swings and roundabouts.... Jeremy.
* Fix from John Reilly for equivalence tests.Jeremy Allison2000-11-171-1/+1
| | | | Jeremy.
* Herb's warning fixes. Also the POSIX locking fix.Jeremy Allison2000-10-061-1/+1
| | | | | We now use our own vfs layer to do get/set acl calls (hurrah!). Jeremy.
* Restructuring of vfs layer to include a "this" pointer - can be an fsp orJeremy Allison2000-10-061-6/+6
| | | | | | | | | | | | | | | a conn struct depending on the call. We need this to have a clean NT ACL call interface. This will break any existing VFS libraries (that's why this is pre-release code). Andrew gets credit for this one :-) :-). In addition - added Herb's WITH_PROFILE changes - Herb - please examine the changes I've made to the smbd/reply.c code you added. The original code was very ugly and I have replaced it with a START_PROFILE(x)/END_PROFILE(x) pair using the preprocessor. Please check this compiles ok with the --with-profile switch. Jeremy.
* the first cut of the internal messaging system.Andrew Tridgell2000-09-111-1/+1
| | | | | The motivation for this system is to replace the UDP message for oplocks, but this commit only does the "set debug level" message.
* allow posix locking database to be opened read-only (for smbstatus)Andrew Tridgell2000-06-132-11/+11
|
* add some bracketsAndrew Tridgell2000-06-131-1/+1
|
* Fixed misunderstanding found during CIFS conference. Overlapping lockJeremy Allison2000-05-251-340/+278
| | | | | | ranges (not just included lock ranges) should be handled correctly. UNIT test still needed. Jeremy.
* Using a structure for a tdb key can lead to insideous, hardHerb Lewis2000-05-103-20/+25
| | | | | | | | | | | | | | | | | to find bugs. On 64 bit IRIX, structure packing means that a struct { SMB_DEV_T dev /* 4 bytes */ SMB_INO_T ino /* 8 bytes */ } has 4 bytes of padding between the two members. If you don't null the memory before using it as a tdb key, you randomly can't find keys depending on what is in the padding. This caused me immense pain and was hard to track down.... :-) Jeremy.
* Fix for uninitialized memory read in brlock code. brl_locktest now needsJeremy Allison2000-05-052-2/+3
| | | | | to correctly set the fnum, as the brl_conflict code looks at it. Jeremy.
* Two fixes. Added missong logic & case in lock split code.Jeremy Allison2000-05-051-4/+12
| | | | | Fixed range split into two, as DLIST_ADD has the wrong semantics... Jeremy.
* Updated to fix overlapping problem.Jeremy Allison2000-05-041-68/+142
| | | | Jeremy.
* Fix for debug statement crash.Jeremy Allison2000-05-041-1/+1
| | | | Jeremy.
* Fix based on Elrond's code to reduce the store size on removing dead records.Jeremy Allison2000-05-031-0/+1
| | | | Jeremy.
* Fixed the bug locktest.c found, it was an off-by-one error in the non-overlapJeremy Allison2000-05-031-1/+1
| | | | | case. Jeremy.
* Fixed silly bug where I wasn't checking for matching fd's in closing a file.Jeremy Allison2000-05-031-7/+24
| | | | | This caused smbd crashes on SIGKILL. Jeremy.
* Added range info to the panic message to track down the bug withJeremy Allison2000-05-031-1/+5
| | | | | locktest. Jeremy.
* - clear dead locks at startupAndrew Tridgell2000-05-031-2/+47
| | | | - fixed a bug which caused lock records to not decrease in size
* Fix for stacking locks in brlock and POSIX. Windows only allows a read lockJeremy Allison2000-05-032-92/+130
| | | | | | | | to overlay a write lock on the same fnum. When overlaying read locks onto a write lock, the number of locks is counted, and the first unlock removes the write lock and downgrades this to a read lock. Do the same when mapping to POSIX. Jeremy.
* Implemented the last (I hope:-) part of the locking puzzle, the referenceJeremy Allison2000-05-021-23/+90
| | | | | | | counting when Windows downgrades a write lock to a read lock, then reference counts the unlocks to match the locks. With this code the POSIX unlock isn't done until the final Windows unlock. Jeremy.
* split the username in the vuser structure into a separateAndrew Tridgell2000-05-021-1/+2
| | | | | | | | userdom_struct. As the name implies this also contains a domain (unused at the moment). This will be important shortly, as operation in appliance mode needs the domain to be always carried with the username.
* Moved uglyness needed in fcntl locking (64->32 bit mapping, NFSJeremy Allison2000-05-021-3/+121
| | | | | | | errors etc.) into locking/posix.c, where it is needed. fcntl_lock in lib/util.c is now very small and clean. Added (*lock) op to vfs layer. Jeremy.
* Added sys_fork() and sys_getpid() functions to stop the overheadJeremy Allison2000-05-021-8/+8
| | | | | of doing a system call every time we want to just get our pid. Jeremy.
* locking/posix.c: Fixed double-free nasty crash bug found by insure.Jeremy Allison2000-05-011-3/+0
| | | | | | utils/make_smbcodepage.c: utils/make_unicodemap.c: Insure 'make install' fixes. Jeremy.