summaryrefslogtreecommitdiff
path: root/source3/smbd/notify_internal.c
AgeCommit message (Collapse)AuthorFilesLines
2012-01-18s3: Add a "lock_order" argument to db_openVolker Lendecke1-2/+4
This will be used to enforce a lock hierarchy between the databases. We have seen deadlocks between locking.tdb, brlock.tdb, serverid.tdb and notify*.tdb. These should be fixed by refusing a dbwrap_fetch_locked that does not follow a defined lock hierarchy.
2011-10-13lib/util: Add back control of mmap and hash size in tdb for top level buildAndrew Bartlett1-2/+11
This passes down a struct loadparm_context to allow these parameters to be checked. This may be s3 or s4 context, allowing the #if _SAMBA_BUILD_ macro to go away safely. Andrew Bartlett
2011-10-11s3:smbd: convert notify db to use dbwrap wrapper functionsMichael Adam1-28/+30
Avoid direct use of the db_record and db_context structs.
2011-07-29s3:dbwrap: move all .c and .h files of dbwrap to lib/dbwrap/Michael Adam1-1/+1
Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Fri Jul 29 13:34:22 CEST 2011 on sn-devel-104
2011-07-29s3:dbwrap: move db_open() to a file dbwrap_open.c of its own.Michael Adam1-0/+1
Also start new folder lib/dbwrap/ where dbwrap_open.c is stored and make the fallbacke implementation functoins non-static and create a dbwrap_private.h header file that contains their prototypes.
2011-06-20tdb_compat: Higher level API fixes.Rusty Russell1-1/+1
My previous patches fixed up all direct TDB callers, but there are a few utility functions and the db_context functions which are still using the old -1 / 0 return codes. It's clearer to fix up all the callers of these too, so everywhere is consistent: non-zero means an error. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-09s3-talloc Change TALLOC_ZERO_P() to talloc_zero()Andrew Bartlett1-2/+2
Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_P isn't standard talloc.
2011-05-06s3: only include tdb headers where needed.Günther Deschner1-0/+1
Guenther
2011-05-06lib/util Move source3 tdb_wrap_open() into the common code.Andrew Bartlett1-0/+1
This #if _SAMBA_BUILD == 3 is very unfortunate, as it means that in the top level build, these options are not available for these databases. However, having two different tdb_wrap lists is a worse fate, so this will do for now. Andrew Bartlett
2011-05-05More simple const fixes.Jeremy Allison1-1/+1
2011-03-30s3-messages: make ndr_messaging.h part of messages.h.Günther Deschner1-1/+0
Guenther
2011-03-30s3-messages: only include messages.h where needed.Günther Deschner1-0/+1
Guenther
2011-03-30s3: include smbd/smbd.h where needed.Günther Deschner1-0/+1
Guenther
2011-03-30s3-includes: only include system/filesys.h when needed.Günther Deschner1-0/+1
Guenther
2010-09-27Change to using TDB_INCOMPATIBLE_HASH (the jenkins hash) on allJeremy Allison1-4/+4
TDB_CLEAR_IF_FIRST tdb's. For tdb's like gencache where we open without CLEAR_IF_FIRST and then with CLEAR_IF_FIRST if corrupt this is still safe to use as if opening an existing tdb the new hash will be ignored - it's only used on creating a new tdb not opening an old one. Jeremy.
2010-09-26s3: Remove talloc_autofree_context() from notify_internal_parent_init()Volker Lendecke1-4/+3
2010-08-26s3-build: use dbwrap.h only where needed.Günther Deschner1-0/+1
Guenther
2010-05-18s3: Remove use of iconv_convenience.Jelmer Vernooij1-14/+9
2010-05-06s3: only include gen_ndr headers where needed.Günther Deschner1-0/+1
This shrinks include/includes.h.gch by the size of 7 MB and reduces build time as follows: ccache build w/o patch real 4m21.529s ccache build with patch real 3m6.402s pch build w/o patch real 4m26.318s pch build with patch real 3m6.932s Guenther
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)