summaryrefslogtreecommitdiff
path: root/source3/smbd/notify.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r22391: Looks bigger than it is. Make "inbuf" availableJeremy Allison1-2/+3
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-10r21123: Make notify_fsp() static to notify.c.Volker Lendecke1-14/+68
Volker (This used to be commit d663b729c0b3f4265fa90a5df8534ad52b8f04eb)
2007-10-10r21108: Send sys_notify_watch through the VFS, FAM is nextVolker Lendecke1-6/+4
(This used to be commit 603a96761391f36ae9a1c8777d3333ab5c02eb34)
2007-10-10r21093: Remove the hash and dnotify backends. Disabling FAM for this ↵Volker Lendecke1-204/+0
checkin, I'm working on that right now. Volker (This used to be commit 01c9fb17281e99300b339d2cfc0acac7ca94843c)
2007-10-10r21092: Ok, that's the one that activates the Samba4 notify backend.Volker Lendecke1-40/+57
Now to clean up / fix lots of stuff. Volker (This used to be commit 9e7443fa1417c01be903b15073825dc4def78d99)
2007-10-10r21091: Fix the build without inotifyVolker Lendecke1-0/+4
(This used to be commit 686345b7ed727db7b1d9bc164208ecfb612837b6)
2007-10-10r21090: Add some helper routinesVolker Lendecke1-0/+38
(This used to be commit 985dde8ed0a7e6da5adf9c55654a4fd362b22acb)
2007-10-10r21087: Make the param list of notify_fname match notify_triggerVolker Lendecke1-2/+2
(This used to be commit defa28f9c3eda85a072b972fffd2d5de8bcf01f7)
2007-10-10r21084: Make the Samba4 files compile in Samba3, not activated yet.Volker Lendecke1-0/+27
Volker (This used to be commit c24854433a28cc066072a7107e29aa7fe2bec3c8)
2007-10-10r21077: A step to minimize the diff later: This pulls in unmodified files ↵Volker Lendecke1-5/+0
from Samba4, not compiled yet. This way the modifications become visible later. ntvfs/common/notify.c -> smbd/notify_internal.c ntvfs/sysdep/inotify.c -> smbd/notify_inotify.c Naturally I had to disable notify again :-) Volker (This used to be commit cdb7d582b7397faa5926bff5783da7fef4209948)
2007-10-10r21064: The core of this patch isVolker Lendecke1-2/+3
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-10r20982: Fix a segfault -- I wonder why my make test did not show this earlier...Volker Lendecke1-1/+2
(This used to be commit 4984b0627c84cc192868238c0936ca1a38628cd8)
2007-10-10r20932: This is the basic infrastructure for inotify support. This is far ↵Volker Lendecke1-0/+5
from being complete, in particular the various mask bits are not correctly supported yet. Checkin in now, I want to see how the build farm likes it. Volker (This used to be commit c9a5d011a91359b242f6c26f46e96ecea6a44a3b)
2007-10-10r20931: This changes the notify infrastructure from a polling-based to an ↵Volker Lendecke1-178/+48
event-driven based approach. The only remaining hook into the backend is now void *(*notify_add)(TALLOC_CTX *mem_ctx, struct event_context *event_ctx, files_struct *fsp, uint32 *filter); (Should we put this through the VFS, so that others can more easily plug in?) The trick here is that the backend can pick filter bits that the main smbd should not handle anymore. Thanks to tridge for this idea. The backend can notify the main smbd process via void notify_fsp(files_struct *fsp, uint32 action, char *name); The core patch is not big, what makes this more than 1800 lines are the individual backends that are considerably changed but can be reviewed one by one. Based on this I'll continue with inotify now. Volker (This used to be commit 9cd6a8a82792b7b6967141565d043b6337836a5d)
2007-10-10r20858: change_notify_reply_packet is staticVolker Lendecke1-2/+4
(This used to be commit a1d0644d156c360d52fb837d3eecddb202135ebe)
2007-10-10r20856: Make "struct notify_mid_map" private to notify.cVolker Lendecke1-0/+11
(This used to be commit beecef0c70521d28dd88552d661281d9c585eb22)
2007-10-10r20854: Ok, now I think we're at a point where looking at notify starts to ↵Volker Lendecke1-28/+439
make sense again :-) Volker (This used to be commit 5533cdeec1b0cdee39b1d89e2320587dc9281ee6)
2007-10-10r20634: A *LOT* more work is necessary before touching notify remotely ↵Volker Lendecke1-439/+28
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 f146a85e74c84e78a11e616a1cbeaeef4693a0e0)
2007-10-10r20602: Fix coverity ID 339. SMB_ASSERT does not panic without -DDEVELOPER.Volker Lendecke1-1/+4
Volker (This used to be commit 33b5950bec407e295b2c6139e21d062e376df330)
2007-10-10r20597: Survive some of the notify mask tests.Volker Lendecke1-0/+14
(This used to be commit e4a2e63272dc5b20413597179d06b0185c4a6817)
2007-10-10r20451: Survive the first of the filter-tests (mkdir).Volker Lendecke1-16/+24
Add lots of TODOs :-) Volker (This used to be commit 0e953884a15873b0962ab1ab064d6b3a436726c0)
2007-10-10r20443: Fix a compiler warningVolker Lendecke1-1/+2
(This used to be commit 19781d71fc5a8146109395cd53c04cf13cc48652)
2007-10-10r20442: Slight rewrite of the change notify infrastructure. This now ↵Volker Lendecke1-66/+136
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 ce0ad24988075465addcac0b9afc872e909135af)
2007-10-10r20433: Work in progress: Survive more of RAW-NOTIFY.Volker Lendecke1-27/+71
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 c813f71d0036ec52c99a97e60fe33ee47d0635fa)
2007-10-10r20394: This is a *VERY* early start of my work on notify.Volker Lendecke1-11/+282
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 bcf5c751cbe203c00814642e26440cf88f300bce)
2007-10-10r20237: Replace exit_server with exit_server_cleanly where appropriate. AllJames Peach1-1/+1
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-10r15555: Make "change notify timeout" a per-share parameter - usedJeremy Allison1-1/+13
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 5a17bffbcd5082fde79c241468a0ff2b5903d540)
2007-10-10r13482: Push the FAM notification file descriptor into the selectJames Peach1-0/+9
set to avoid unnecessary polling. (This used to be commit 1dce945ccbba25092cf54890301c8f78f8aede33)
2007-10-10r13027: Support file change notifications from FAM.James Peach1-1/+7
(This used to be commit 652b511ff24ce41c7745a0e00363e619e5027828)
2007-10-10r11344: I don't think share mode conflicts occur on deletingJeremy Allison1-3/+4
a directory when you've got permissions. Need to write a smbtorture test for this. Jeremy. (This used to be commit e959a5be393eb59b8987eb6967a2ee5d11978f41)
2007-10-10r7963: Add aio support to 3.0.Jeremy Allison1-0/+1
Jeremy. (This used to be commit 1de27da47051af08790317f5b48b02719d6b9934)
2007-10-10r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison1-1/+1
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 620f2e608f70ba92f032720c031283d295c5c06a)
2003-10-21Fix signing miss-sequence noticed by Stefan Metzmacher <metze@metzemix.de>Jeremy Allison1-1/+1
Jeremy. (This used to be commit 63f331564396e7a4f16dce95bb98d3b6c4b75351)
2003-08-07Turns out I had my packet sequences wrong for oplock break code.Jeremy Allison1-1/+1
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 85907f02cec566502d9e4adabbd414020a26064d)
2003-08-02Ensure we don't leak any sign records on cancel of pending requests.Jeremy Allison1-0/+1
Jeremy. (This used to be commit 9a8ffc239c0f1aada713de7e9e007066738d8874)
2003-07-24Ensure everywhere we defer an incoming SMB request (blocking lock queue,Jeremy Allison1-0/+3
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 33a377f3726c85379ba5b962dd7c8ead337b892f)
2003-07-24SMB signing is now working with change notify. Need to fix the disconnectJeremy Allison1-1/+1
when bad signature received, plus check the oplock breaks.... Jermey. (This used to be commit dd83931a00ec0a2c4b78b939c54bc101ec82312f)
2002-12-12Added "kernel change notify" boolean to allow easier valgrind testing.Jeremy Allison1-1/+2
Jeremy. (This used to be commit faf89f214f326bc07f728b354062b2287cda1208)
2002-01-30Removed version number from file header.Tim Potter1-2/+1
Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
2001-11-05Don't put a \n on the end of the arg to exit_server()Tim Potter1-1/+1
(This used to be commit dfb8566220c3e90ca2b757ea124f53aed103269e)
2001-10-19Tidy up debug in notify code.Jeremy Allison1-12/+18
Jeremy. (This used to be commit 7707c5e07385ce5ac3732715d586ad6c6b41de65)
2001-10-02Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter1-2/+0
(This used to be commit 2d0922b0eabfdc0aaf1d0797482fef47ed7fde8e)
2001-09-17move to SAFE_FREE()Simo Sorce1-2/+2
(This used to be commit a95943fde0ad89ae3f2deca2f7ba9cb5ab612b74)
2001-09-04the next stage in the NTSTATUS/WERROR change. smbd and nmbd now compile, but ↵Andrew Tridgell1-1/+1
the client code still needs some work (This used to be commit dcd6e735f709a9231860ceb9682db40ff26c9a66)
2001-08-27converted smbd to use NTSTATUS by defaultAndrew Tridgell1-10/+1
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 83d9896c1ea8be796192b51a4678c2a3b87f7518)
2001-06-09*Wonderful* patch from Andrew Bartlett that will help ensure tdb's areJeremy Allison1-1/+2
cleaned on clients abending connections. Thanks Andrew ! Jeremy. (This used to be commit 1b3977c5367a0b713b194f369abd9872ae01ac2a)
2001-03-11Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMRJeremy Allison1-4/+0
RPC code to merge with new passdb code. Currently rpcclient doesn't compile. I'm working on it... Jeremy. (This used to be commit 0be41d5158ea4e645e93e8cd30617c038416e549)
2000-06-14allow the notify implementation to choose the select timeout changeAndrew Tridgell1-2/+2
(This used to be commit b1441d9622609af5ef598c5e1e1f5af438dc0731)
2000-06-12enable the Linux change notify code and change some notify debug codeAndrew Tridgell1-1/+4
(This used to be commit c6be511fcc1be79619a0184f03d4c33dbfe12f04)
2000-06-12totally rewrote the async signal, notification and oplock notificationAndrew Tridgell1-284/+117
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 44766c39e0027c762bee8b33b12c621c109a3267)