lib: Remove messages_local Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
s3: messages: Implement cleanup of dead records. 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_ again 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_init 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_init Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
messaging: Fix a memleak on error in messaging_tdb_init Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Kai Blin <kai@samba.org>
messaging: Enforce just one messaging context 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_event 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_tdb 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-sends Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
messaging: use local talloc ctx instead of talloc_tos 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_helpers 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. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
s3: Add messaging_tdb_event() 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. 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 build 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 -1 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 legnth 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. 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. This is a noop for tdb1. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>