summaryrefslogtreecommitdiff
path: root/source3/smbd/notify_internal.c
AgeCommit message (Collapse)AuthorFilesLines
2010-04-06fix a segfault in the notify subsystemChristian Ambach1-5/+16
When the notify_array cannot be loaded correctly, do not keep the half-baked parsing results in the global variable. This can lead to segfaults next time notify_load is entered and the seqnum has not changed. This has been seen in a case where mixed smbd versions were running in a CTDB cluster (versions with and w/o commit c216d1e6 that changed the notify_entry structure). There will be missed notifications until all smbds are at the same software level, but this should be acceptable and is better than crashing and interrupting client operations. This fix cleans up the notify_array, removes the unparseable data from the TDB and returns a fresh notify_array that can be worked with. The NDR_PRINT_DEBUG had to be moved to only be called when the parsing succeeded, it was seen to cause additional segfaults. The status variable is intentionally left to NT_STATUS_OK to not make callers abort and report errors to the clients and make them disconnect. Signed-off-by: Christian Ambach <christian.ambach@de.ibm.com>
2010-03-25s3: Add a comment to notify_internal_parent_init, this is pretty confusingVolker Lendecke1-0/+6
2010-03-25s3: Make sure our CLEAR_IF_FIRST optimization works for the notify tdbsVolker Lendecke1-0/+27
The notify tdb files are opened at tconX time, which leads to one fcntl lock for CLEAR_IF_FIRST detection per smbd. This opens the tdbs in the parent and holds it, so that tdb_reopen_all correctly catches the CLEAR_IF_FIRST bit.
2010-02-14s3-smbd: convert lanman and notify code to TYPESAFE_QSORT()Andrew Tridgell1-6/+2
2010-02-12s3: notify_onelevel does not use seqnums, so don't open asking for itVolker Lendecke1-1/+1
2009-11-05s3: Fix a crash in notify_remove_onelevel when "change notify = no"Volker Lendecke1-0/+4
2009-11-05s3: Fix the talloc hierarchy in notify_remove_onelevelVolker Lendecke1-1/+1
We want to free the record early, not when talloc_tos() is free'ed.
2009-04-30Fix notify_onelevel: notify is not necessarily enabledVolker Lendecke1-0/+4
Thanks to Günther Deschner! Volker
2009-04-16Add notify_onelevel.tdbVolker Lendecke1-0/+286
This optimizes non-recursive notifys. For non-recursive notifies we can use a per-directory file-id indexed notify record. This matters for the Windows Explorer and IIS cases which do not use recursive notifies. In these cases, we do not have to shuffle around the whole notify record on every change. For the cluster case, this improves correctness of the notifies, ctdb only distributes the tdb seqnum once a second, so we can lose notifies.
2009-04-16Rename notify_context->db to db_recursiveVolker Lendecke1-9/+12
2009-04-11Fix some nonempty blank linesVolker Lendecke1-4/+4
2008-09-23s3: use samba4 prototype for ndr_push/pull_struct_blob.Günther Deschner1-4/+4
Guenther
2007-11-09ndr: change NTSTAUS into enum ndr_err_code (samba3 callers)Stefan Metzmacher1-13/+19
lib/messages_local.c rpc_client/ndr.c smbd/notify_internal.c utils/net_rpc_registry.c metze (This used to be commit c2645d2164c05976a98bafed980b6029baf89977)
2007-11-09prepare changes in ndr codeStefan Metzmacher1-3/+2
metze (This used to be commit 9ba00e7c167fb871a3d9acbd9fc5ce4e935d92c2)
2007-10-10r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell1-2/+1
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
2007-10-10r23779: Change from v2 or later to v3 or later.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10r23186: Checkin on behalf of Tridge:Volker Lendecke1-57/+57
Change notify.tdb to use dbwrap (This used to be commit 3a089403871df88f4a3bf86c3db0d169cd4fb434)
2007-10-10r22736: Start to merge the low-hanging fruit from the now 7000-line cluster ↵Volker Lendecke1-1/+1
patch. This changes "struct process_id" to "struct server_id", keeping both is just too much hassle. No functional change (I hope ;-)) Volker (This used to be commit 0ad4b1226c9d91b72136310d3bbb640d2c5d67b8)
2007-10-10r22542: Move over to using the _strict varients of the tallocJeremy Allison1-2/+2
calls. No functional changes. Looks bigger than it is :-). Jeremy. (This used to be commit f6fa3080fee1b20df9f1968500840a88cf0ee592)
2007-10-10r22009: change TDB_DATA from char * to unsigned char *Stefan Metzmacher1-1/+1
and fix all compiler warnings in the users metze (This used to be commit 3a28443079c141a6ce8182c65b56ca210e34f37f)
2007-10-10r21181: Add some debug, fix the NT_STATUS_IO_TIMEOUT problems in the ↵Volker Lendecke1-1/+8
RAW-NOTIFY test in the build farm. Volker (This used to be commit 3dd1bf667f42bd03a7b7159b9c2ad9ccbd269130)
2007-10-10r21120: Make notify a bit more robust: Delete the notify records if we ↵Volker Lendecke1-14/+34
figured out that the process holding it is not around anymore. Tridge, please review this and possibly also include it in 4. We can discuss the error message for "unknown target" from messaging_send, INVALID_HANDLE seemed to be most appropriate to me. Volker (This used to be commit 3b3ed7429e54b571375914e473eafc9888b5b204)
2007-10-10r21111: Reorganize the change notify params a bit. We now have the per-shareVolker Lendecke1-2/+1
parameters change notify = [yes]/no # do we do it at all kernel change notify = [yes]/no # enable/disable inotify Those who want FAM need to say change notify = yes vfs objects = notify_fam Volker (This used to be commit c3a44d8b9606fc516faceb69b8e87bfc8be312f3)
2007-10-10r21108: Send sys_notify_watch through the VFS, FAM is nextVolker Lendecke1-3/+4
(This used to be commit 603a96761391f36ae9a1c8777d3333ab5c02eb34)
2007-10-10r21084: Make the Samba4 files compile in Samba3, not activated yet.Volker Lendecke1-16/+14
Volker (This used to be commit c24854433a28cc066072a7107e29aa7fe2bec3c8)
2007-10-10r21077: A step to minimize the diff later: This pulls in unmodified files ↵Volker Lendecke1-0/+661
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)