summaryrefslogtreecommitdiffstats
path: root/source3/lib/messages_local.c
Commit message (Collapse)AuthorAgeFilesLines
* lib: Remove messages_localVolker Lendecke2014-04-231-573/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: messages: Implement cleanup of dead records.Jeremy Allison2014-04-031-0/+38
| | | | | | | | | | | | When a smbd process dies, pending messages.tdb records for this process might not get cleaned up. Implement a cleanup for dead records that is triggered after a smbd dies uncleanly; the records for that PID are deleted. Based on a patchset from Christof Schmitt <cs@samba.org>. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* tdb_wrap: Remove tdb_wrap_open_ againVolker Lendecke2014-03-311-2/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* messaging: Avoid passing lp_ctx to tdb_wrap_open in messaging_tdb_parent_initVolker Lendecke2014-03-311-3/+7
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* messaging: Avoid passing lp_ctx to tdb_wrap_open in messaging_tdb_initVolker Lendecke2014-03-311-3/+9
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* messaging: Fix a memleak on error in messaging_tdb_initVolker Lendecke2014-02-201-0/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Kai Blin <kai@samba.org>
* messaging: Enforce just one messaging contextVolker Lendecke2014-02-191-0/+20
| | | | | | | | | | The current messaging implementation is based on a tdb indexed by server_id. If we have more than one messaging context in a process, messages might not arrive at the right context and be dropped, depending on which signal handler is triggered first. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* messaging3: Remove unused messaging_tdb_eventVolker Lendecke2014-01-211-10/+0
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Jan 21 10:07:21 CET 2014 on sn-devel-104
* messaging: Move the self-send logic out of messaging_tdbVolker Lendecke2014-01-091-54/+0
| | | | | | | This is not specific to tdb Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* messaging3: Do not go through messages.tdb for self-sendsVolker Lendecke2013-12-051-0/+54
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* messaging: use local talloc ctx instead of talloc_tosDavid Disseldorp2013-11-201-4/+4
| | | | | | | | | messaging_tdb_send() allocates a stackframe and stores it in a local variable, subsequent allocations should use the variable instead of calling talloc_tos(). Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3-param: Rename loadparm_s3_context -> loadparm_s3_helpersAndrew Bartlett2012-06-271-2/+2
| | | | | | | | | | | | | | | | | This helps clarify the role of this structure and wrapper function. The purpose here is to provide helper functions to the lib/param loadparm_context that point back at the s3 lp_ functions. This allows a struct loadparm_context to be passed to any point in the code, and always refer to the correct loadparm system. If this has not been set, the variables loaded in the lib/param code will be returned. As requested by Michael Adam. Andrew Bartlett Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Jun 27 17:11:16 CEST 2012 on sn-devel-104
* lib/tdb_wrap: use tdb directly, not tdb_compat.Rusty Russell2012-06-191-1/+1
| | | | | Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* s3: Add messaging_tdb_event()Volker Lendecke2012-04-171-0/+10
| | | | | | | | This is a void* that represents a signal handler attached to some custom tevent_context. This is necessary to make the tdb based messaging infrastructure trigger its business when we are sitting in tevent_loop_once for an event context that is not the main one in the messaging context.
* tdb_wrap: Move to specific directory.Jelmer Vernooij2012-03-101-1/+1
| | | | | | | | | | It's a bit confusing to mix low-level and high-level libraries. We had multiple libraries in one directory, and there were have circular dependencies with other libraries outside that directory (in this case, samba-hostconfig). Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Mar 10 23:13:01 CET 2012 on sn-devel-104
* lib/util: Add back control of mmap and hash size in tdb for top level buildAndrew Bartlett2011-10-131-2/+19
| | | | | | | | 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
* s3-messaging Do not ever send a kill to -1Andrew Bartlett2011-09-281-0/+3
| | | | | | | | | This from a report by Olaf Flebbe <o.flebbe@science-computing.de> Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Wed Sep 28 00:23:44 CEST 2011 on sn-devel-104
* s3-messaging Ensure that the message is of the correct legnthAndrew Bartlett2011-09-271-1/+1
| | | | | | By using ndr_pull_struct_blob_all we are more robust against wrongly formatted messages. Andrew Bartlett
* tdb_chainlock: check returns for 0, not -1.Rusty Russell2011-06-201-2/+2
| | | | | | | | TDB2 returns a negative error number on failure. This is compatible if we always check for != 0 instead of == -1. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* tdb_fetch_compat: use instead of tdb_fetch.Rusty Russell2011-06-201-1/+1
| | | | | | | This is a noop for tdb1. 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-talloc Change TALLOC_P() to talloc()Andrew Bartlett2011-06-091-1/+1
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_P isn't standard talloc.
* s3-talloc Change TALLOC_REALLOC_ARRAY() to talloc_realloc()Andrew Bartlett2011-06-091-1/+1
| | | | | | | Using the standard macro makes it easier to move code into common, as TALLOC_REALLOC_ARRAY isn't standard talloc. Andrew Bartlett
* 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
* s3-messages: make ndr_messaging.h part of messages.h.Günther Deschner2011-03-301-2/+0
| | | | Guenther
* s3-messages: only include messages.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
* Move error reporting of messaging context creation fail intoJeremy Allison2010-11-141-1/+1
| | | | | | | | the daemons themselves. Allows client utilities to silently fail to create a messaging context due to access denied on the messaging tdb (which I need for the following patch). Jeremy.
* Change to using TDB_INCOMPATIBLE_HASH (the jenkins hash) on allJeremy Allison2010-09-271-2/+2
| | | | | | | | | | 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 messaging_tdb_parent_init()Volker Lendecke2010-09-261-3/+2
|
* s3: Use msg_ctx->id in messagingVolker Lendecke2010-07-041-4/+5
| | | | This removes some references to procid_self() deep inside the code
* s3: Remove use of iconv_convenience.Jelmer Vernooij2010-05-181-3/+2
|
* s3: Add a comment to messaging_tdb_parent_init, this is pretty confusingVolker Lendecke2010-03-251-0/+6
|
* s3: Make sure our CLEAR_IF_FIRST optimization works for messaging.tdbVolker Lendecke2010-03-251-0/+16
| | | | | | In the child, we fully re-open messaging.tdb, which leads to one fcntl lock for CLEAR_IF_FIRST detection per smbd. This opens the tdb in the parent and holds it, so that tdb_reopen_all correctly catches the CLEAR_IF_FIRST bit.
* s3: Fix some nonempty blank linesVolker Lendecke2010-03-251-6/+6
|
* Use TDB_VOLATILE instead of tdb_set_max_dead()Volker Lendecke2009-05-191-5/+2
|
* s3:messages: finally make message_dispatch() staticStefan Metzmacher2009-01-221-1/+2
| | | | metze
* s3:messaging: start with to use signal events instead of the raw signal ↵Stefan Metzmacher2009-01-221-37/+65
| | | | | | interfaces metze
* s3-nbt: fix remaining callers of ndr_push/pull_struct_blob.Günther Deschner2008-09-231-2/+2
| | | | Guenther
* Convert messages_local.c to use "struct tdb_wrap"Volker Lendecke2008-05-191-15/+17
| | | | | | | | This works around a problem with smbcontrol opening messaging.tdb twice. Very likely this is not the right fix. Michael, please check. Volker (This used to be commit 9d52cf3f9394eb78465173bad53ea8dc86512213)
* Remove a static, and "signal_received" needs to be sig_atomic_tVolker Lendecke2007-12-051-15/+18
| | | | (This used to be commit 8acd4a202f6b4518c2ce9cdd30f5dfb14b86c07c)
* ndr: change NTSTAUS into enum ndr_err_code (samba3 callers)Stefan Metzmacher2007-11-091-8/+8
| | | | | | | | | | lib/messages_local.c rpc_client/ndr.c smbd/notify_internal.c utils/net_rpc_registry.c metze (This used to be commit c2645d2164c05976a98bafed980b6029baf89977)
* 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)
* r23408: Remove a bogus commentVolker Lendecke2007-10-101-1/+0
| | | | (This used to be commit 0442e680eeacb56852e200fdf6f78e4972ecad68)
* r23344: Better error messageVolker Lendecke2007-10-101-2/+4
| | | | (This used to be commit 4042d2cdd2797e2f675ddeb0d288327ca55d9f5b)
* r23117: Factor out local messaging.Volker Lendecke2007-10-101-0/+431
This removes message_block / message_unblock. I've talked to Jeremy and Günther, giving them my reasons why I believe they have no effect. Neither could come up with a counter-argument, so they go :-) (This used to be commit a925e0991ffbaea4a533bab3a5d61e5d367d46c8)