1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

11 Commits

Author SHA1 Message Date
Andrew Tridgell
b95a294a08 fixed usage of socklen_t and also tidied up SIG_ATOMIC_T, using a typedef instead of a define
(This used to be commit e2ecff419f)
2001-06-25 02:53:13 +00:00
Tim Potter
55eab3e232 More compiler warning fixes.
(This used to be commit 88a7b2c3f8)
2001-05-08 06:14:08 +00:00
Jeremy Allison
77429f8717 Fix from matthew.hart@veritas.com - bad error return from linux_oplock_receive_message().
Jeremy.
(This used to be commit b35ca2c6b1)
2001-04-27 18:03:12 +00:00
Jeremy Allison
da3053048c Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMR
RPC code to merge with new passdb code.
Currently rpcclient doesn't compile. I'm working on it...
Jeremy.
(This used to be commit 0be41d5158)
2001-03-11 00:32:10 +00:00
Jeremy Allison
5e06151e4d Paranoia changes to ensure that anything touched by a signal handler
and the main code is declared as VOLATILE SIG_ATOMIC_T.
Jeremy.
(This used to be commit b737c784e3)
2000-06-19 21:30:27 +00:00
Andrew Tridgell
c8de9b8fe1 enable the Linux change notify code and change some notify debug code
(This used to be commit c6be511fcc)
2000-06-12 17:06:00 +00:00
Andrew Tridgell
b2d01bd2db totally rewrote the async signal, notification and oplock notification
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!
(This used to be commit 44766c39e0)
2000-06-12 15:53:31 +00:00
Andrew Tridgell
a4ba9bb939 a better test for oplocks being enabled in this kernel
(This used to be commit cc0e919fdc)
2000-06-11 06:46:05 +00:00
Andrew Tridgell
0fb1dbe7fa fixed Linux capabilities handling
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
(This used to be commit afa98d511f)
2000-06-11 06:24:54 +00:00
Andrew Tridgell
8843a6379d Linux kernel oplocks now seem to work, but need a _lot_ of testing
I had to modify sys_select() to not loop on EINTR. I added a wrapper
called sys_select_intr() which gives the old behaviour.
(This used to be commit b28cc4163b)
2000-06-11 05:57:58 +00:00
Andrew Tridgell
26848a3478 a first pass at Linux kernel oplocks support
(This used to be commit 3253085d98)
2000-06-10 14:29:31 +00:00