summaryrefslogtreecommitdiffstats
path: root/source3/smbd/notify_internal.c
Commit message (Collapse)AuthorAgeFilesLines
* s3:dbwrap: move all .c and .h files of dbwrap to lib/dbwrap/Michael Adam2011-07-291-1/+1
| | | | | Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Fri Jul 29 13:34:22 CEST 2011 on sn-devel-104
* s3:dbwrap: move db_open() to a file dbwrap_open.c of its own.Michael Adam2011-07-291-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.
* tdb_compat: Higher level API fixes.Rusty Russell2011-06-201-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>
* s3-talloc Change TALLOC_ZERO_P() to talloc_zero()Andrew Bartlett2011-06-091-2/+2
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_P isn't standard talloc.
* s3: only include tdb headers where needed.Günther Deschner2011-05-061-0/+1
| | | | Guenther
* lib/util Move source3 tdb_wrap_open() into the common code.Andrew Bartlett2011-05-061-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
* More simple const fixes.Jeremy Allison2011-05-051-1/+1
|
* s3-messages: make ndr_messaging.h part of messages.h.Günther Deschner2011-03-301-1/+0
| | | | Guenther
* s3-messages: only include messages.h where needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3: include smbd/smbd.h where needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3-includes: only include system/filesys.h when needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* Change to using TDB_INCOMPATIBLE_HASH (the jenkins hash) on allJeremy Allison2010-09-271-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.
* s3: Remove talloc_autofree_context() from notify_internal_parent_init()Volker Lendecke2010-09-261-4/+3
|
* s3-build: use dbwrap.h only where needed.Günther Deschner2010-08-261-0/+1
| | | | Guenther
* s3: Remove use of iconv_convenience.Jelmer Vernooij2010-05-181-14/+9
|
* s3: only include gen_ndr headers where needed.Günther Deschner2010-05-061-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
* fix a segfault in the notify subsystemChristian Ambach2010-04-061-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>
* s3: Add a comment to notify_internal_parent_init, this is pretty confusingVolker Lendecke2010-03-251-0/+6
|
* s3: Make sure our CLEAR_IF_FIRST optimization works for the notify tdbsVolker Lendecke2010-03-251-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.
* s3-smbd: convert lanman and notify code to TYPESAFE_QSORT()Andrew Tridgell2010-02-141-6/+2
|
* s3: notify_onelevel does not use seqnums, so don't open asking for itVolker Lendecke2010-02-121-1/+1
|
* s3: Fix a crash in notify_remove_onelevel when "change notify = no"Volker Lendecke2009-11-051-0/+4
|
* s3: Fix the talloc hierarchy in notify_remove_onelevelVolker Lendecke2009-11-051-1/+1
| | | | We want to free the record early, not when talloc_tos() is free'ed.
* Fix notify_onelevel: notify is not necessarily enabledVolker Lendecke2009-04-301-0/+4
| | | | | | Thanks to Günther Deschner! Volker
* Add notify_onelevel.tdbVolker Lendecke2009-04-161-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.
* Rename notify_context->db to db_recursiveVolker Lendecke2009-04-161-9/+12
|
* Fix some nonempty blank linesVolker Lendecke2009-04-111-4/+4
|
* s3: use samba4 prototype for ndr_push/pull_struct_blob.Günther Deschner2008-09-231-4/+4
| | | | Guenther
* ndr: change NTSTAUS into enum ndr_err_code (samba3 callers)Stefan Metzmacher2007-11-091-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)
* prepare changes in ndr codeStefan Metzmacher2007-11-091-3/+2
| | | | | metze (This used to be commit 9ba00e7c167fb871a3d9acbd9fc5ce4e935d92c2)
* r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell2007-10-101-2/+1
| | | | (This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
* r23779: Change from v2 or later to v3 or later.Jeremy Allison2007-10-101-1/+1
| | | | | Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
* r23186: Checkin on behalf of Tridge:Volker Lendecke2007-10-101-57/+57
| | | | | Change notify.tdb to use dbwrap (This used to be commit 3a089403871df88f4a3bf86c3db0d169cd4fb434)
* r22736: Start to merge the low-hanging fruit from the now 7000-line cluster ↵Volker Lendecke2007-10-101-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)
* r22542: Move over to using the _strict varients of the tallocJeremy Allison2007-10-101-2/+2
| | | | | | calls. No functional changes. Looks bigger than it is :-). Jeremy. (This used to be commit f6fa3080fee1b20df9f1968500840a88cf0ee592)
* r22009: change TDB_DATA from char * to unsigned char *Stefan Metzmacher2007-10-101-1/+1
| | | | | | | and fix all compiler warnings in the users metze (This used to be commit 3a28443079c141a6ce8182c65b56ca210e34f37f)
* r21181: Add some debug, fix the NT_STATUS_IO_TIMEOUT problems in the ↵Volker Lendecke2007-10-101-1/+8
| | | | | | | | | RAW-NOTIFY test in the build farm. Volker (This used to be commit 3dd1bf667f42bd03a7b7159b9c2ad9ccbd269130)
* r21120: Make notify a bit more robust: Delete the notify records if we ↵Volker Lendecke2007-10-101-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)
* r21111: Reorganize the change notify params a bit. We now have the per-shareVolker Lendecke2007-10-101-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)
* r21108: Send sys_notify_watch through the VFS, FAM is nextVolker Lendecke2007-10-101-3/+4
| | | | (This used to be commit 603a96761391f36ae9a1c8777d3333ab5c02eb34)
* r21084: Make the Samba4 files compile in Samba3, not activated yet.Volker Lendecke2007-10-101-16/+14
| | | | | Volker (This used to be commit c24854433a28cc066072a7107e29aa7fe2bec3c8)
* r21077: A step to minimize the diff later: This pulls in unmodified files ↵Volker Lendecke2007-10-101-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)