summaryrefslogtreecommitdiffstats
path: root/source/locking/locking.c
Commit message (Collapse)AuthorAgeFilesLines
* Don't early delete the share mode tdb dataVolker Lendecke2008-01-121-2/+0
| | | | We now refer directly to the file name in the tdb data, so don't delete it.
* Trivial simplificationVolker Lendecke2008-01-121-5/+1
|
* Some more talloc_tos()Volker Lendecke2008-01-101-7/+7
|
* use talloc_tos in a few more placesVolker Lendecke2008-01-101-2/+2
|
* Do not talloc_strdup filename and servicepathVolker Lendecke2008-01-071-16/+8
|
* allocate share_mode_str only when neededVolker Lendecke2008-01-041-1/+4
|
* Tiny simplificationsVolker Lendecke2007-12-101-10/+14
| | | | | | locking.c:open_read_only was unused don't export the silly boolean flag locking_init(bool read_only)
* Remove a staticVolker Lendecke2007-12-101-11/+9
|
* Add a commentVolker Lendecke2007-11-181-1/+7
|
* Fix a valgrind errorVolker Lendecke2007-11-181-3/+4
|
* Add MAX_DNS_NAME_LENGTH, remove more pstrings.Jeremy Allison2007-11-151-9/+9
| | | | Jeremy.
* RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison2007-10-181-26/+26
| | | | | | | bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy.
* r25055: Add file_id_string_tosVolker Lendecke2007-10-101-2/+2
| | | | This removes file_id_string_static and file_id_string_static2
* r24266: Remove the "open files database hash size" parameterVolker Lendecke2007-10-101-2/+1
| | | | This has been superseded by the "tdb_hashsize:<tdbname>" parameter
* r24117: use locking_key() instead of forming the TDB_DATA keyStefan Metzmacher2007-10-101-4/+1
| | | | | | by hand metze
* r23956: merge from 3_2-ctdb-tridge:Stefan Metzmacher2007-10-101-0/+8
| | | | | | | | fixed a bug with dead share mode entries jra: please tell me if it's ok to merge this to 3_2_0. metze
* r23908: Fix bug with interaction of optimization withJeremy Allison2007-10-101-8/+24
| | | | | | POSIX locking. We can't do lock counts with POSIX, so stop counting if we get a POSIX lock request. Jeremy.
* r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell2007-10-101-2/+1
|
* r23779: Change from v2 or later to v3 or later.Jeremy Allison2007-10-101-1/+1
| | | | Jeremy.
* r23510: Tidy calls to smb_panic by removing trailing newlines. Print theJames Peach2007-10-101-12/+12
| | | | failed expression in SMB_ASSERT.
* r23486: Ok, this time with a hopefully successful make test in the right place:Volker Lendecke2007-10-101-4/+0
| | | | Remove two local variables
* r23222: share_mode_forall() is only for counting and status display stuff, soVolker Lendecke2007-10-101-1/+1
| | | | traverse_read is enough here
* r23183: Check in a change made by Tridge:Volker Lendecke2007-10-101-51/+35
| | | | | | | | | | | | | This replaces the internal explicit dev/ino file id representation by a "struct file_id". This is necessary as cluster file systems and NFS don't necessarily assign the same device number to the shared file system. With this structure in place we can now easily add different schemes to map a file to a unique 64-bit device node. Jeremy, you might note that I did not change the external interface of smb_share_modes.c. Volker
* r23164: Minor cosmetic checkinVolker Lendecke2007-10-101-2/+2
|
* r23163: Convert locking.tdb to dbwrapVolker Lendecke2007-10-101-91/+109
|
* r23162: Make use of messaging_send_bufVolker Lendecke2007-10-101-4/+2
|
* r23100: Implement the delete on close semantics I've just tested forJeremy Allison2007-10-101-1/+45
| | | | | | in Samba4 smbtorture. Fix rename on an open file handle. Needed for 3.0.25a. Jeremy.
* r23014: For all branches, ensure that if we're blocked on a POSIXJeremy Allison2007-10-101-2/+4
| | | | | | | | lock we know nothing about that we retry the lock every 10 seconds instead of waiting for the standard select timeout. This is how we used to (and are supposed to) work. Jeremy.
* r22846: Chunk one to replace message_send_pid with messaging_send: Deep insideVolker Lendecke2007-10-101-9/+17
| | | | | | locking/locking.c we have to send retry messages to timed lock holders. The majority of this patch passes a "struct messaging_context" down there. No functional change, survives make test.
* r22542: Move over to using the _strict varients of the tallocJeremy Allison2007-10-101-1/+1
| | | | | calls. No functional changes. Looks bigger than it is :-). Jeremy.
* r22009: change TDB_DATA from char * to unsigned char *Stefan Metzmacher2007-10-101-10/+10
| | | | | | and fix all compiler warnings in the users metze
* r21726: Fix stupid cut-n-paste typo. Thanks to volker forJeremy Allison2007-10-101-1/+1
| | | | | being on the ball..... :-). Jeremy.
* r21724: Optimization pointed out by Volker. If we don'tJeremy Allison2007-10-101-0/+20
| | | | | | have any outstanding locks or blocking locks then we don't need to read the lock db. on close. Jeremy.
* r21723: Make use of the per-hashchain "freelists"Volker Lendecke2007-10-101-0/+3
|
* r21706: get_delete_on_close_flag() is the perfect candidate for ↵Volker Lendecke2007-10-101-7/+21
| | | | tdb_parse_record()
* r21257: Better fix for bug #4188 :Jeremy Allison2007-10-101-36/+1
| | | | | | Windows Vista RC1 and RC2 can't delete directory on Samba share based on work by Joe Meadows <jmeadows@webopolis.com>. Jeremy.
* r21191: Add in the POSIX open/mkdir/unlink calls.Jeremy Allison2007-10-101-3/+6
| | | | | | | | Move more error code returns to NTSTATUS. Client test code to follow... See if this passes the build-farm before I add it into 3.0.25. Jeremy.
* r20916: Add in the delete on close final fix - but only enabledJeremy Allison2007-10-101-0/+4
| | | | | with -DDEVELOPER. Jeremy.
* r20883: W00t! I now understand how "delete on close" reallyJeremy Allison2007-10-101-23/+16
| | | | | | | | | | | | | | | | works - even with the strange "initial delete on close" semantics. The "initial delete on close" flag isn't committed to the share mode db until the handle is closed, and is discarded if any real "delete on close" was set. This allows me to remove the "initial_delete_on_close" flag from the share db, and move it into a BOOL in files_struct. Warning ! You must do a make clean after this. Cope with the wrinkle in directory delete on close which is done differently from files. We now pass all Samba4 smbtortute BASE-DELETE tests except for the one checking that files can't be created in a directory which has the delete on close set (possibly expensive to fix). Jeremy.
* r20873: Some correctness fixes w.r.t. Samba4 torture BASE-DELETE.Jeremy Allison2007-10-101-0/+40
| | | | | | | | Allow us to correctly refuse to set delete on close on a non-empty directory. There are still some delete-on-close wrinkles to be fixed, but I understand how to do that better now. I'll fix this tomorrow. Jeremy.
* r19668: Convert the locking params to use struct share_param instead of snumVolker Lendecke2007-10-101-8/+7
|
* r19078: talloc_strdup can failVolker Lendecke2007-10-101-0/+6
|
* r17924: Get rid of warnings now that talloc is merged.Volker Lendecke2007-10-101-3/+1
| | | | | | Destructors now take a pointer to the "real" destroyed object as an argument. Volker
* r17346: Add optimisation vl needs for the cluster code whereJeremy Allison2007-10-101-3/+3
| | | | | | we don't get the chainlock when getting the byte range lock record read-only. Jeremy.
* r17314: Optimisation for POSIX locking. If we're downgradingJeremy Allison2007-10-101-2/+4
| | | | | | | a POSIX lock (applying a read-lock) and we overlap pending read locks then send them an unlock message, we may have allowed them to proceed. Jeremy.
* r17293: After the results from the cluster tests in Germany,Jeremy Allison2007-10-101-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | fix the messaging code to call the efficient calls : save_re_uid() set_effective_uid(0); messaging_op restore_re_uid(); instead of using heavyweight become_root()/unbecome_root() pairs around all messaging code. Fixup the messaging code to ensure sec_init() is called (only once) so that non-root processes still work when sending messages. This is a lighter weight solution to become_root()/unbecome_root() (which swaps all the supplemental groups) and should be more efficient. I will migrate all server code over to using this (a similar technique should be used in the passdb backend where needed). Jeremy.
* r17177: Get rid of a global variable by adding a private data pointer toVolker Lendecke2007-10-101-5/+22
| | | | | | share_mode_forall(). Volker
* r17105: Fix the race Volker found - we had a non-lockedJeremy Allison2007-10-101-10/+12
| | | | | | | | | | | | | | | | | | | | | region between detecting a pending lock was needed and when we added the blocking lock record. Make sure that we hold the lock over all this period. Removed the old code for doing blocking locks on SMB requests that never block (the old SMBlock and friends). Discovered something interesting about the strange NT_STATUS_FILE_LOCK_CONFLICT return. If we asked for a lock with zero timeout, and we got an error of NT_STATUS_FILE_LOCK_CONFLICT, treat it as though it was a blocking lock with a timeout of 150 - 300ms. This only happens when timeout is sent as zero and can be seen quite clearly in ethereal. This is the real replacement for old do_lock_spin() code. Re-worked the blocking lock select timeout to correctly use milliseconds instead of the old second level resolution (far too coarse for this work). Jeremy.
* r17098: Samba3 now cleanly passes Samba4 RAW-LOCK tortureJeremy Allison2007-10-101-56/+46
| | | | | | | | test. Phew - that was painful :-). But what it means is that we now implement lock cancels and I can add lock cancels into POSIX lock handling which will fix the fast/slow system call issue with cifsfs ! Jeremy.
* r16945: Sync trunk -> 3.0 for 3.0.24 code. Still needJeremy Allison2007-10-101-48/+39
| | | | | | | to do the upper layer directories but this is what everyone is waiting for.... Jeremy.