summaryrefslogtreecommitdiff
path: root/source3/smbd/oplock.c
AgeCommit message (Collapse)AuthorFilesLines
2009-01-27s3:smbd: make kernel oplocks event drivenStefan Metzmacher1-51/+13
And use signal events for Linux oplocks. metze
2009-01-22s3:smbd: restructure kernel oplocks codeStefan Metzmacher1-23/+10
This converts the irix oplocks code to use a fd event and removes the last special case for file descriptors for the main sys_select(). metze
2009-01-08s3:smbd: move all globals and static variables in globals.[ch]Stefan Metzmacher1-9/+1
The goal is to move all this variables into a big context structure. metze
2009-01-05s3:events: change event_add_timed() prototype to match samba4Stefan Metzmacher1-2/+1
metze
2008-12-18Fix bug #5980 - Race condition when granting level2 oplocks can cause break ↵Jeremy Allison1-4/+27
notify to be missed. Jeremy.
2008-12-17Fix bug #5979 - Level 2 oplocks being granted improperly,Jeremy Allison1-5/+18
Jeremy.
2008-05-27Allow server manager to close open files selected by id.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 7eeed8bb41059ec2bddedb6a71deddeec7f33af2)
2008-04-07locking: store the write time in the locking.tdbStefan Metzmacher1-3/+6
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 (This used to be commit 6aaa2ce0eeb46f6735ec984a2e7aadde7a7f456d)
2008-01-10use talloc_tos in a few more placesVolker Lendecke1-3/+3
(This used to be commit 65dd869bea351010c67f02046ae4134bdada1a4c)
2008-01-04Refactor the crypto code after a very helpful conversationJeremy Allison1-13/+13
with Volker. Mostly making sure we have data on the incoming packet type, not stored in the smb header. Jeremy. (This used to be commit c4e5a505043965eec77b5bb9bc60957e8f3b97c8)
2007-12-30As the encryption is stream based there's no reasonJeremy Allison1-5/+7
oplock breaks can't be encrypted. If we have multiple contexts I should probably attach them to the connection struct, but for now use the global context number. Jeremy. (This used to be commit 5b4b335ed0d1dc738f1f099e5c638361f3aede07)
2007-12-26Add SMB encryption. Still fixing client decrypt butJeremy Allison1-1/+5
negotiation works. Jeremy. (This used to be commit d78045601af787731f0737b8627450018902b104)
2007-11-03Remove the smb_read_error global variable and replaceJeremy Allison1-1/+0
it with accessor functions. "One global or pstring a day...." :-). Jeremy. (This used to be commit d50d14c300abc83b7015718ec48acc8b3227a273)
2007-10-18RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison1-12/+12
bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
2007-10-10[GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.Gerald (Jerry) Carter1-1/+1
(This used to be commit 5c6c8e1fe93f340005110a7833946191659d88ab)
2007-10-10r25055: Add file_id_string_tosVolker Lendecke1-12/+12
This removes file_id_string_static and file_id_string_static2 (This used to be commit 638c848c9afe374feb30e34c494f89b2a6c64f7b)
2007-10-10r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell1-2/+1
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
2007-10-10r23779: Change from v2 or later to v3 or later.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10r23589: Ensure we will always release any timeout handlerJeremy Allison1-6/+4
on fsp close or removal of oplock. Mulitple removals are safe. Jeremy. (This used to be commit 6de0970704b3eff2b71e6bf499c6dda45d4d5e2d)
2007-10-10r23410: Merge the core of the cluster code.Volker Lendecke1-0/+6
I'm 100% certain I've forgotten to merge something, but the main code should be in. It's mainly in dbwrap_ctdb.c, ctdbd_conn.c and messages_ctdbd.c. There should be no changes to the non-cluster case, it does survive make test on my laptop. It survives some very basic tests with ctdbd enables, I did not do the full test suite for clusters yet. Phew... Volker (This used to be commit 15553d6327a3aecdd2b0b94a3656d04bf4106323)
2007-10-10r23183: Check in a change made by Tridge:Volker Lendecke1-56/+38
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 (This used to be commit 9b10dbbd5de8813fc15ebbb6be9b18010ffe8139)
2007-10-10r22868: Replace some message_send_pid calls with messaging_send_pid calls. MoreVolker Lendecke1-65/+77
tomorrow. (This used to be commit 74fa57ca5d7fa8eace72bbe948a08a0bca3cc4ca)
2007-10-10r22736: Start to merge the low-hanging fruit from the now 7000-line cluster ↵Volker Lendecke1-5/+5
patch. This changes "struct process_id" to "struct server_id", keeping both is just too much hassle. No functional change (I hope ;-)) Volker (This used to be commit 0ad4b1226c9d91b72136310d3bbb640d2c5d67b8)
2007-10-10r22391: Looks bigger than it is. Make "inbuf" availableJeremy Allison1-1/+1
to all callers of smb_setlen (via set_message() calls). This will allow the server to reflect back the correct encryption context. Jeremy. (This used to be commit 2d80a96120a5fe2fe726f00746d36d85044c4bdb)
2007-10-10r21191: Add in the POSIX open/mkdir/unlink calls.Jeremy Allison1-0/+2
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. (This used to be commit 83dbbdff345fa9e427c9579183f4380004bf3dd7)
2007-10-10r21064: The core of this patch isVolker Lendecke1-10/+20
void message_register(int msg_type, void (*fn)(int msg_type, struct process_id pid, - void *buf, size_t len)) + void *buf, size_t len, + void *private_data), + void *private_data) { struct dispatch_fns *dfn; So this adds a (so far unused) private pointer that is passed from message_register to the message handler. A prerequisite to implement a tiny samba4-API compatible wrapper around our messaging system. That itself is necessary for the Samba4 notify system. Yes, I know, I could import the whole Samba4 messaging system, but I want to do it step by step and I think getting notify in is more important in this step. Volker (This used to be commit c8ae60ed65dcce9660ee39c75488f2838cf9a28b)
2007-10-10r20846: Before this gets out of control...Volker Lendecke1-2/+3
This add a struct event_context and infrastructure for fd events to smbd. This is step zero to import lib/events. Jeremy, I rely on you to watch the change in receive_message_or_smb() closely. For the normal code path this should be the only relevant change. The rest is either not yet used or is cosmetic. Volker (This used to be commit cd07f93a8aecb24c056e33b1ad3447a41959810f)
2007-10-10r20237: Replace exit_server with exit_server_cleanly where appropriate. AllJames Peach1-3/+3
send_smb failures should be clean exits. All times when we exit as a matter of policy should also be clean exits. (This used to be commit d6382092e72120a3c89ffe81975e8898d454bf06)
2007-10-10r18224: Paranoia - ensure the oplock event handler isJeremy Allison1-0/+6
removed immediately in the handler. Extra debug info tracking down winbindd DC selection. Jeremy. (This used to be commit 7ba9b6ce588f716589e9f88ed146fad36c4b3758)
2007-10-10r17452: Some C++ warningsVolker Lendecke1-5/+5
(This used to be commit e4b8c79a9d6f7323953121887af4f482d04a9228)
2007-10-10r17293: After the results from the cluster tests in Germany,Jeremy Allison1-11/+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. (This used to be commit 4ace291278d9a44f5c577bdd3b282c1231e543df)
2007-10-10r17134: Fix a debug messageVolker Lendecke1-1/+1
(This used to be commit 40e267981174840f4f36d1863985ee010ef5074a)
2007-10-10r16435: Add in the uid info that Jerry needs into theJeremy Allison1-0/+2
share_mode struct. Allows us to know the unix uid of the opener of the file/directory. Needed for info level queries on open files. Jeremy. (This used to be commit d929323d6f513902381369d77bcd7b714346d713)
2007-10-10r15958: Make us pass RAW-OPLOCK with kernel oplocks off.Jeremy Allison1-0/+1
This allows a requestor to set FORCE_OPLOCK_BREAK_TO_NONE to ensure we don't break to level 2. Fixed a couple of resource leaks in error paths in open_file_ntcreatex. Jeremy. (This used to be commit c7c9adcce7f13d01445f31b07fb28a76f0a1d6df)
2007-10-10r15668: DOS or FCB opens share one share mode entry from differentJeremy Allison1-3/+3
fsp pointers. Ensure we cope with this to pass Samba4 DENY tests (we used to pass these, there must have been a regression with newer code). We now pass them. Jeremy (This used to be commit fd6fa1d4eaf61783df74ee2da50d331477f06998)
2007-10-10r15446: Tidy up the formatting of locking debug messages and make it moreJames Peach1-18/+22
consistent. Bring oplocks withing the purview of the locking debug channel. (This used to be commit e817cfd7d3a42d141198122eada58b5a7ba90e9c)
2007-10-10r15088: Remove all time() and gettimeofday() calls out of the mainlineJeremy Allison1-15/+3
packet processing code. Only do these when needed (ie. in the idle timeout code). We drop an unneccessary global here too. Jeremy. (This used to be commit 8272a5ab0605fcf95527143c4f909aa1008e5b94)
2007-10-10r13916: Fix Coverity bug #29. Looks like my code. I wonder how much there is ↵Volker Lendecke1-0/+1
still lurking... Volker (This used to be commit 1345a52794f4f55173ed677af3d0714e88bf17c6)
2007-10-10r13571: Replace all calls to talloc_free() with thye TALLOC_FREE()Gerald Carter1-8/+8
macro which sets the freed pointer to NULL. (This used to be commit b65be8874a2efe5a4b167448960a4fcf6bd995e2)
2007-10-10r13498: Fix the kernel oplocks code for IRIX. Should fix #3515.Jeremy Allison1-16/+7
Jeremy. (This used to be commit 006cf9c3654e7f18e01b75a5fe87798df862d26a)
2007-10-10r13482: Push the FAM notification file descriptor into the selectJames Peach1-10/+5
set to avoid unnecessary polling. (This used to be commit 1dce945ccbba25092cf54890301c8f78f8aede33)
2007-10-10r13233: build fixes for smbmnt; remove unused variable; ready to ship ↵Gerald Carter1-1/+0
3.0.21b now (This used to be commit 51fe6bd845f33139654f641947cffeaaf8e88124)
2007-10-10r13198: Fix issues exposed by Jerry's testing on 64-bit SolarisJeremy Allison1-55/+138
(I hope). Separate 3.0.21b patch sent to Jerry. Jeremy. (This used to be commit 837e7ea7e40cedc6b01e023445feb4a90c4bf8b9)
2007-10-10r13192: Fix up alignment issues when printing share modeJeremy Allison1-0/+9
entries. Add paranioa to debug so we know when an entry is unused. Jeremy. (This used to be commit fa5fab313e3728ff49c00ca1097242039506f83e)
2007-10-10r12877: Stop passing structs around in smb messages, insteadJeremy Allison1-55/+133
always linearize into little-endian. Should fix all Solaris issues with this, plus provide a cleaner base moving forward for cluster-aware Samba where smbd's can communicate across different compilers/architectures (eventually these message will have to go cross-machine). Jeremy. (This used to be commit d01824b78576a034428e1cef73868d1169057991)
2007-10-10r12713: Remove use of uint8_t -> uint8.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 4473ac4ef9c86574fc49b1e67089b59b14b6d10d)
2007-10-10r12460: Fixes for bug 3349Volker Lendecke1-0/+8
(This used to be commit 040eda6bf0517204d5650702eea7e1d1c5eeb3d5)
2007-10-10r12203: Add the share path into the sharemode db. This involvesJeremy Allison1-3/+3
revving the minor version number for libsmbsharemodes (we now have a new _ex interface that takes the share path as well as the filename). Needed for #3303. Some code written by SATOH Fumiyasu <fumiya@samba.gr.jp> included in the changes to locking/locking.c. The smbstatus output is a bit of a mess and needs overhauling... Jeremy. (This used to be commit 9d93af713f8520ca506730dd32aa2b994937eaba)
2007-10-10r10656: BIG merge from trunk. Features not copied overGerald Carter1-1010/+321
* \PIPE\unixinfo * winbindd's {group,alias}membership new functions * winbindd's lookupsids() functionality * swat (trunk changes to be reverted as per discussion with Deryck) (This used to be commit 939c3cb5d78e3a2236209b296aa8aba8bdce32d3)
2007-10-10r9126: Fix valgrind bug Volker found in interaction with new aio bufferJeremy Allison1-5/+7
flipping and oplocks. Jeremy. (This used to be commit a18c5ff3eada93e46da3f7cbd326b8dceb72e147)