summaryrefslogtreecommitdiffstats
path: root/source/smbd/oplock_linux.c
Commit message (Collapse)AuthorAgeFilesLines
* it is possible for some of the real time signals to be used by glibc,Andrew Tridgell2003-03-281-1/+4
| | | | | which then changes SIGRTMIN. It is also possible for bash to leave some real time signals blocked at startup. This fixes both problems.
* Ensure we do not pass uninitialised data to the kernel. (Picked up byAndrew Bartlett2003-01-131-0/+2
| | | | | | valgrind). Andrew Bartlett
* compile warngin fixes merged from 2.2Gerald Carter2002-06-171-6/+6
|
* Overly complex but neccessary fix for kernel oplock problems. The issueJeremy Allison2002-06-061-21/+24
| | | | | | | | | | | | | | | is that there are some times when we should return an EINTR from a select, some times when we should not. As we can take a signal at any time, we have to eat EINTR's in some selects. This means we need to check for kernel oplock breaks more often in the main loop, as well as add the queuing mechanism needed for the changenotify code (due to the mistake in understanding POSIX semantics w.r.t. setting a signal mask in a signal handler). This code now passes all my tests. However, (and IMHO and I know tridge disagrees) - the correct way to fix this is to run with RT signals blocked and explicitly unblock them just before the main select, block them after and then process them all in one place. Just my 2cents :-). Jeremy.
* Merge of receive_local_message fix from 2.2.5.Jeremy Allison2002-05-221-5/+5
| | | | Jeremy.
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* Fixed unsigned / long unsigned format missmatch.Jeremy Allison2001-11-061-4/+4
| | | | Jeremy
* Move from timestamp to gen count file id's for finding oplocked filesJeremy Allison2001-10-201-46/+46
| | | | | in a tdb. Jeremy.
* Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter2001-10-021-2/+0
|
* convert more code to using d_printfAndrew Tridgell2001-09-081-1/+2
|
* fixed usage of socklen_t and also tidied up SIG_ATOMIC_T, using a typedef ↵Andrew Tridgell2001-06-251-5/+5
| | | | instead of a define
* More compiler warning fixes.Tim Potter2001-05-081-2/+2
|
* Fix from matthew.hart@veritas.com - bad error return from ↵Jeremy Allison2001-04-271-2/+2
| | | | | | linux_oplock_receive_message(). Jeremy.
* Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMRJeremy Allison2001-03-111-5/+0
| | | | | | RPC code to merge with new passdb code. Currently rpcclient doesn't compile. I'm working on it... Jeremy.
* Paranoia changes to ensure that anything touched by a signal handlerJeremy Allison2000-06-191-7/+7
| | | | | and the main code is declared as VOLATILE SIG_ATOMIC_T. Jeremy.
* enable the Linux change notify code and change some notify debug codeAndrew Tridgell2000-06-121-6/+17
|
* totally rewrote the async signal, notification and oplock notificationAndrew Tridgell2000-06-121-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | handling in Samba. This was needed due to several limitations and races in the previous code - as a side effect the new code is much cleaner :) in summary: - changed sys_select() to avoid a signal/select race condition. It is a rare race but once we have signals doing notification and oplocks it is important. - changed our main processing loop to take advantage of the new sys_select semantics - split the notify code into implementaion dependent and general parts. Added the following structure that defines an implementation: struct cnotify_fns { void * (*register_notify)(connection_struct *conn, char *path, uint32 flags); BOOL (*check_notify)(connection_struct *conn, uint16 vuid, char *path, uint32 flags, void *data, time_t t); void (*remove_notify)(void *data); }; then I wrote two implementations, one using hash/poll (like our old code) and the other using the new Linux kernel change notify. It should be easy to add other change notify implementations by creating a sructure of the above type. - fixed a bug in change notify where we were returning the wrong error code. - rewrote the core change notify code to be much simpler - moved to real-time signals for leases and change notify Amazingly, it all seems to work. I was very surprised!
* a better test for oplocks being enabled in this kernelAndrew Tridgell2000-06-111-1/+18
|
* fixed Linux capabilities handlingAndrew Tridgell2000-06-111-21/+39
| | | | | | I used a trick where CAP_LEASE isn't claimed until it is needed. This means we avoid a system call per setreuid(), and never call capset() unless a user tries to get a oplock on a file that they don't own
* Linux kernel oplocks now seem to work, but need a _lot_ of testingAndrew Tridgell2000-06-111-6/+57
| | | | | I had to modify sys_select() to not loop on EINTR. I added a wrapper called sys_select_intr() which gives the old behaviour.
* a first pass at Linux kernel oplocks supportAndrew Tridgell2000-06-101-0/+205