1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-04 08:22:08 +03:00
Commit Graph

20 Commits

Author SHA1 Message Date
e065c3a58f Fix from Steve G <linux_4ever@yahoo.com>. Ensure sigemptyset is called on
the sa_mask to prevent valgrind complaints.
Jeremy.
-
03a5e62300 merged real time signal fixes from head -
2a1adb8f81 Merge indirection, signed/unsigned and uninitialiased-value fixes from HEAD.
Andrew Bartlett
-
a204339073 Fix fd leak with kernel change notify.
Jeremy.
-
03ac082dcb updated the 3.0 branch from the head branch - ready for alpha18 -
6a58c9bd06 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
-
2d0922b0ea Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header. -
a95943fde0 move to SAFE_FREE() -
debb471267 The big character set handling changeover!
This commit gets rid of all our old codepage handling and replaces it with
iconv. All internal strings in Samba are now in "unix" charset, which may
be multi-byte. See internals.doc and my posting to samba-technical for
a more complete explanation.
-
e2ecff419f fixed usage of socklen_t and also tidied up SIG_ATOMIC_T, using a typedef instead of a define -
88a7b2c3f8 More compiler warning fixes. -
f952380c5d utils/torture.c: Added one more delete on close test.
smbd/notify_kernel.c: This code was wrong I believe. It was structured to only
return a changenotify event on being called from timeout processing (t != 0).
The kernel changenotify events should fire on *asynchronous* processing (EINTR
return from select caused by the realtime signal delivery) with t == 0.
Reported by Juergen Hasch (Hasch@t-online.de).
ANDREW PLEASE CHECK THIS !
Currently the hash style changenotify is done on async processing as well
as timeout processing. As this is expensive we may want to revisit doing this
and maybe set it to fire only on timeout processing.
Jeremy.
-
0be41d5158 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.
-
07dffc4ee9 Fix to allow a timestamp of zero to cause an instantaneous changenotify
scan - then call this from renames. This allows instantaneous update for
W2k renames.
Jeremy.
-
b737c784e3 Paranoia changes to ensure that anything touched by a signal handler
and the main code is declared as VOLATILE SIG_ATOMIC_T.
Jeremy.
-
b1441d9622 allow the notify implementation to choose the select timeout change -
9f542484d1 use DN_ATTRIB kernel change notify attribute -
20a06b7fb7 always use the DN_CREATE mask (NT expects file creation always to
cause a notify)
-
c6be511fcc enable the Linux change notify code and change some notify debug code -
44766c39e0 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!
-