summaryrefslogtreecommitdiffstats
path: root/source/locking
Commit message (Collapse)AuthorAgeFilesLines
* Fix bug 6776 - Running overlapping Byte Lock test will core dump Samba ↵Jeremy Allison2009-10-081-137/+214
| | | | | | daemon. Re-write core of POSIX locking logic. Jeremy. (cherry picked from commit faf7197b3b4ac9fefeb0fca31a888c9e84bed92f)
* Fix Coverity ID 897: REVERSE_INULLVolker Lendecke2009-06-101-1/+1
| | | | (cherry picked from commit a0e9521b306a7e83d09de4616a66b49d259f0bbc)
* Use procid_str in debug messages for better cluster-debuggabilityVolker Lendecke2009-04-171-2/+2
| | | | (cherry picked from commit 4955e1610af3086cc7e8d0344313a124b23a4e31)
* Fix a scary "fill_share_mode_lock failed" messageVolker Lendecke2009-03-271-1/+2
| | | | | | | | To me "fill_share_mode_lock failed" is a "can't happen" alert. There is however a perfectly valid case in get_file_infos() when the file is not open. Change the corresponding debug message to level 10 and explain more. (cherry picked from commit 74efc72bca5707ff35df9282c843d62c4cf331c3)
* Last part of fix for #6154 - zfs does not honor admin users.Jeremy Allison2009-03-061-4/+15
| | | | | Jeremy. (cherry picked from commit ddaa1bae7567c81fb8e478c439bb970edab2f9c3)
* Fix more asprintf warnings and some error path errors.Jeremy Allison2009-01-021-7/+6
| | | | | Jeremy. (cherry picked from commit 44ab658b6d80c66f20d80aede7fc7cd2b9a941b1)
* Fix bug #5979 - Level 2 oplocks being granted improperly,Jeremy Allison2009-01-021-1/+10
| | | | | Jeremy. (cherry picked from commit da1852f65188efc559738c2e5da295b702ad4619)
* Fix a delete on close divergence from windows [2/2]Tim Prouty2008-12-111-45/+1
| | | | | | This second patch cleans up by removing all of the code that is made obsolete by the first patch. It should cause no functional changes. (cherry picked from commit c39c35f3e67a726c6464c1497e46fe7a2eb3dc77)
* Fix debug message to show correct function name.Jeremy Allison2008-09-091-1/+1
| | | | | Jeremy. (cherry picked from commit 7150f8e89c93be7d122e19f650522be591544611)
* Write times code update.Jeremy Allison2008-09-091-5/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ok, here's the fix for the write times breakage with the new tests in S4 smbtorture. The key is keeping in the share mode struct the "old_file_time" as the real write time, set by all the write and allocation calls, and the "changed_write_time" as the "sticky" write time - set by the SET_FILE_TIME calls. We can set them independently (although I kept the optimization of not setting the "old_file_time" is a "changed_write_time" was already set, as we'll never see it. This allows us to update the write time immediately on the SMBwrite truncate case, SET_END_OF_FILE and SET_ALLOCATION_SIZE calls, whilst still have the 2 second delay on the "normal" SMBwrite, SMBwriteX calls. I think in a subsequent patch I'd like to change the name of these from "old_file_time" to "write_time" and "changed_write_time" to "sticky_write_time" to make this clearer. I think I also fixed a bug in Metze's original code in that once a write timestamp had been set from a "normal" SMBwriteX call the fsp->update_write_time_triggered variable was set and then never reset - thus meaning the write timestamp would never get updated again on subsequent SMBwriteX's. The new code checks the update_write_time_event event instead, and doesn't update is there's an event already scheduled. Metze especially, please check this over for your understanding. Jeremy. (cherry picked from commit aff490ef3b32b3bb2c11cf35ed3fa0272178da3f)
* Fix alignment problems on sparc, bug 5512Volker Lendecke2008-07-091-19/+20
| | | | | Patch successfully tested by Christoph Kaegi <kaph@zhaw.ch>, thanks. (cherry picked from commit 9f8df16f476c49da85000b7365c8a6e33b8b71fc)
* Allow server manager to close open files selected by id.Jeremy Allison2008-05-271-1/+1
| | | | Jeremy.
* Remove the "stat_open()" function, flag, and all associated code. It was onlyJeremy Allison2008-05-021-4/+0
| | | | | | | being (correctly) used in the can_read/can_write checks for hide unreadable/unwritable and this is more properly done using the functions in smbd/file_access.c. Preparing to do NT access checks on all file access. Jeremy.
* Slight reformatting of fd_close_posix(), while I'm at it.Michael Adam2008-04-211-5/+9
| | | | | | Wrap lines and remove trailing space. Michael
* Change fd_close_posix() to return int instead of NTSTATUS.Michael Adam2008-04-211-12/+4
| | | | | | The errno is handed up through the VFS layer to the callers. Michael
* Don't modify the fsp in fd_close_posix() anymore.Michael Adam2008-04-211-4/+0
| | | | | | | | Now that it is inside the vfs layer, this function should not alter the fsp (i.e. set fsp->fh->fd = -1) anymore. That belongs above the vfs layer. Michael
* Move the posix pending close functionality down into the VFS layer.Michael Adam2008-04-211-3/+3
| | | | | | | | | | | | | | | | | This hides the pending close fds from the outside. Call order of SMB_VFS_CLOSE is reversed. Originally, it was: fd_close -> fd_close_posix -> SMB_VFS_CLOSE -> close And now it is: fd_close -> SMB_VFS_CLOSE -> fd_close_posix -> close This is in preparation of removing the fd parameter from the SMB_VFS_CLOSE function. But it is also the right place for the pending close calls anyways. Michael
* Quieten valgrind message on make valgrindtest. This doesn'tJeremy Allison2008-04-111-0/+5
| | | | | seem to be valid (vl - feel free to confirm). Jeremy.
* locking: combine get_delete_on_close_flag() and get_write_time() into ↵Stefan Metzmacher2008-04-071-19/+22
| | | | | | | | get_file_infos() This means we need to fetch the record only once. metze
* locking: store the write time in the locking.tdbStefan Metzmacher2008-04-071-14/+82
| | | | | | | | | This is needed to implement the strange write time update logic later. We need to store 2 time timestamps to distinguish between the time the file system had before the first client opened the file and a forced timestamp update. metze
* Merge leftovers of 0e1a86bc845 in 3-0-ctdbVolker Lendecke2008-03-172-5/+4
|
* Fix some "set but never used" warningsVolker Lendecke2008-01-201-5/+0
|
* Merge CTDB-related fixes from samba-ctdb 3.0 branch ↵Alexander Bokovoy2008-01-161-14/+15
| | | | | (http://samba.org/~tridge/3_0-ctdb) Signed-off-by: Alexander Bokovoy <ab@samba.org>
* 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
|
* Remove redundant parameter fd from SMB_VFS_GETLOCK().Michael Adam2008-01-071-2/+2
| | | | Michael
* Do not talloc_strdup filename and servicepathVolker Lendecke2008-01-071-16/+8
|
* Remove redundant parameter fd from SMB_VFS_LOCK().Michael Adam2008-01-071-2/+2
| | | | Michael
* allocate share_mode_str only when neededVolker Lendecke2008-01-041-1/+4
|
* Remove redundant connection_struct from fd_close_posix() parameter list.Michael Adam2007-12-221-2/+2
| | | | Michael
* Convert the posix_pending_close_db to dbwrap_rbtVolker Lendecke2007-12-111-126/+130
|
* Tiny simplificationsVolker Lendecke2007-12-103-16/+17
| | | | | | 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
|
* Remove two staticsVolker Lendecke2007-12-101-39/+17
|
* 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-152-11/+14
| | | | Jeremy.
* RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison2007-10-183-69/+69
| | | | | | | 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-102-3/+3
| | | | This removes file_id_string_static and file_id_string_static2
* r24571: Only look at errno if the close call actually failedVolker Lendecke2007-10-101-1/+4
| | | | Patch from Ofir Azoulay <Ofir.Azoulay@expand.com> -- thanks
* r24266: Remove the "open files database hash size" parameterVolker Lendecke2007-10-102-4/+2
| | | | 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
* r24034: Print the full cluster pid in print_lock_structVolker Lendecke2007-10-101-2/+2
|
* 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.
* r23885: Fix make test on opi.Volker Lendecke2007-10-101-0/+1
|
* r23882: Fix Coverity id 389 -- finally (I hope)Volker Lendecke2007-10-101-7/+11
|
* r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell2007-10-103-6/+3
|