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

36 Commits

Author SHA1 Message Date
Volker Lendecke
940192ddcc r20854: Ok, now I think we're at a point where looking at notify starts to make sense
again :-)

Volker
(This used to be commit 5533cdeec1)
2007-10-10 12:17:13 -05:00
Volker Lendecke
46fdae1b6b r20634: A *LOT* more work is necessary before touching notify remotely starts to make
sense. Until then, remove it from the tree to keep the diff between 3_0_24 and
3_0 small.

Volker
(This used to be commit f146a85e74)
2007-10-10 12:17:00 -05:00
Volker Lendecke
c79be5713a r20602: Fix coverity ID 339. SMB_ASSERT does not panic without -DDEVELOPER.
Volker
(This used to be commit 33b5950bec)
2007-10-10 12:16:57 -05:00
Volker Lendecke
b2efff8fe5 r20597: Survive some of the notify mask tests.
(This used to be commit e4a2e63272)
2007-10-10 12:16:57 -05:00
Volker Lendecke
92d02f7afe r20451: Survive the first of the filter-tests (mkdir).
Add lots of TODOs :-)

Volker
(This used to be commit 0e953884a1)
2007-10-10 12:16:50 -05:00
Volker Lendecke
dbc231a1c6 r20443: Fix a compiler warning
(This used to be commit 19781d71fc)
2007-10-10 12:16:50 -05:00
Volker Lendecke
200bd10b32 r20442: Slight rewrite of the change notify infrastructure. This now survives the
first of the raw-notify subtests, the one-level test_notify_dir without any
flags around yet.

The tricky part was getting the data structures right, I hope the next tests
don't let that fall over.

fsp->notify is now by default NULL, meaning that nobody has issued a
changenotify call. This means nobody is interested in changes for this
directory.

If that has happened, notify_change_buf collects the changes if no current
request is outstanding, and it collects the requests if no change has happened
since the last request.

Happy New Year, somewhere on this planet it's already 2007 :-)

Volker

P.S: Jeremy, there's a question for you in smbd/files.c line 367.
(This used to be commit ce0ad24988)
2007-10-10 12:16:50 -05:00
Volker Lendecke
165f5f3f40 r20433: Work in progress: Survive more of RAW-NOTIFY.
call_nt_transact_notify_change() is now sync if there are changes around.

A notify_message does a direct reply from within the message, so
process_pending_change_notify_queue is not needed anymore for samba-generated
events. Next step is to restructure the kernel-mechanisms to generate
messages.

Volker
(This used to be commit c813f71d00)
2007-10-10 12:16:49 -05:00
Volker Lendecke
98c082489b r20394: This is a *VERY* early start of my work on notify.
Checking in because Jeremy was bugging me. Potentially this becomes quite
intrusive, I'm not sure if I should open a temporary branch for this.

Jeremy, Jerry, do you think 3_0 is the right place for this?

Volker
(This used to be commit bcf5c751cb)
2007-10-10 12:16:46 -05:00
James Peach
5bb49b08f3 r20237: Replace exit_server with exit_server_cleanly where appropriate. All
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 d6382092e7)
2007-10-10 12:16:34 -05:00
Jeremy Allison
2602e5fab1 r15555: Make "change notify timeout" a per-share parameter - used
when there's no kernel or FAM change notify. If set to zero
this will turn off change notify for the share except when
we ourselves change something (renames / deletes etc. ).
Designed to help on large directory shares where a new
changenotify is issued between each delete. This will
be fixed correctly when we move to internal change notify
(eg. back-port Samba4 changenotify).
Jeremy.
(This used to be commit 5a17bffbcd)
2007-10-10 11:16:59 -05:00
James Peach
8fbdd112b2 r13482: Push the FAM notification file descriptor into the select
set to avoid unnecessary polling.
(This used to be commit 1dce945ccb)
2007-10-10 11:10:05 -05:00
James Peach
543ff192b3 r13027: Support file change notifications from FAM.
(This used to be commit 652b511ff2)
2007-10-10 11:06:11 -05:00
Jeremy Allison
c0dad16e0f r11344: I don't think share mode conflicts occur on deleting
a directory when you've got permissions. Need to write
a smbtorture test for this.
Jeremy.
(This used to be commit e959a5be39)
2007-10-10 11:05:13 -05:00
Jeremy Allison
f2f55d703d r7963: Add aio support to 3.0.
Jeremy.
(This used to be commit 1de27da470)
2007-10-10 10:58:05 -05:00
Jeremy Allison
acf9d61421 r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
(This used to be commit 620f2e608f)
2007-10-10 10:53:32 -05:00
Jeremy Allison
3fe18a46a3 Fix signing miss-sequence noticed by Stefan Metzmacher <metze@metzemix.de>
Jeremy.
(This used to be commit 63f3315643)
2003-10-21 17:40:58 +00:00
Jeremy Allison
110abf10d2 Turns out I had my packet sequences wrong for oplock break code.
I was storing the mid of the oplock break - I should have been
storing the mid from the open. There are thus 2 types of deferred
packet sequence returns - ones that increment the sequence number
(returns from oplock causing opens) and ones that don't (change notify
returns etc). Running with signing forced on does lead to some
interesting tests :-).
Jeremy.
(This used to be commit 85907f02ce)
2003-08-07 02:59:52 +00:00
Jeremy Allison
b925d197f5 Ensure we don't leak any sign records on cancel of pending requests.
Jeremy.
(This used to be commit 9a8ffc239c)
2003-08-02 08:48:01 +00:00
Jeremy Allison
0c9433c031 Ensure everywhere we defer an incoming SMB request (blocking lock queue,
in oplock break state, change notify queue) we also push the MID onto
the deferred signing queue. Tomorrow I will test this with valgrind and
oplock tests.
Jeremy.
(This used to be commit 33a377f372)
2003-07-24 06:56:56 +00:00
Jeremy Allison
08634e26e4 SMB signing is now working with change notify. Need to fix the disconnect
when bad signature received, plus check the oplock breaks....
Jermey.
(This used to be commit dd83931a00)
2003-07-24 06:19:37 +00:00
Jeremy Allison
d0fe43f918 Added "kernel change notify" boolean to allow easier valgrind testing.
Jeremy.
(This used to be commit faf89f214f)
2002-12-12 02:01:56 +00:00
Tim Potter
cd68afe312 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
(This used to be commit 6a58c9bd06)
2002-01-30 06:08:46 +00:00
Tim Potter
d876260d88 Don't put a \n on the end of the arg to exit_server()
(This used to be commit dfb8566220)
2001-11-05 00:02:38 +00:00
Jeremy Allison
4bb9cebf84 Tidy up debug in notify code.
Jeremy.
(This used to be commit 7707c5e073)
2001-10-19 08:37:32 +00:00
Tim Potter
dc1fc3ee8e Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.
(This used to be commit 2d0922b0ea)
2001-10-02 04:29:50 +00:00
Simo Sorce
61b2794968 move to SAFE_FREE()
(This used to be commit a95943fde0)
2001-09-17 11:25:41 +00:00
Andrew Tridgell
19fea3242c the next stage in the NTSTATUS/WERROR change. smbd and nmbd now compile, but the client code still needs some work
(This used to be commit dcd6e735f7)
2001-09-04 07:13:01 +00:00
Andrew Tridgell
e8e98c9ea0 converted smbd to use NTSTATUS by default
major changes include:

- added NSTATUS type
- added automatic mapping between dos and nt error codes
- changed all ERROR() calls to ERROR_DOS() and many to ERROR_NT()
  these calls auto-translate to the client error code system
- got rid of the cached error code and the writebmpx code

We eventually will need to also:
- get rid of BOOL, so we don't lose error info
- replace all ERROR_DOS() calls with ERROR_NT() calls

but that is too much for one night
(This used to be commit 83d9896c1e)
2001-08-27 08:19:43 +00:00
Jeremy Allison
f63ee18c68 *Wonderful* patch from Andrew Bartlett that will help ensure tdb's are
cleaned on clients abending connections. Thanks Andrew !
Jeremy.
(This used to be commit 1b3977c536)
2001-06-09 01:38:54 +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
Andrew Tridgell
cc5502a4d0 allow the notify implementation to choose the select timeout change
(This used to be commit b1441d9622)
2000-06-14 07:11: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
2b37fd8435 fixed comments at top of module
(This used to be commit 02577ab7d2)
2000-06-12 05:34:14 +00:00
Andrew Tridgell
6db12f7180 split all the change notify code out into a separate module
smbd/notify.c. All the data structures are now private to that
module.

this is in preparation for Linux kernel support for change notify
(coming soon to a CVS tree near you)
(This used to be commit 1bb0aad4f6)
2000-06-12 05:32:28 +00:00