summaryrefslogtreecommitdiffstats
path: root/source4/lib/messaging
Commit message (Collapse)AuthorAgeFilesLines
* s4-messaging: Unify list of possible messages into messaging.idlAndrew Bartlett2015-02-161-16/+1
| | | | | | | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Feb 16 14:48:41 CET 2015 on sn-devel-104
* s4-messaging: Remove unused struct imessaging_recAndrew Bartlett2015-02-161-19/+0
| | | | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Volker Lendecke <vl@samba.org>
* messaging4: Enable POOL_USAGEVolker Lendecke2015-02-143-2/+22
| | | | | | | | | | | | | | With this you can watch "samba"'s talloc hierarchy live using smbcontrol <pid> pool-usage Enjoy :-) Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Sat Feb 14 01:59:19 CET 2015 on sn-devel-104
* messaging4: Use messages_dgmVolker Lendecke2015-02-132-337/+107
| | | | | | | | | | | | | This replaces the transport mechanism in source4 with calls to the messages_dgm code. It is supposed to enable "smbcontrol samba pool-usage" as an example without having to rewrite smbcontrol using the source4 based messaging subsystem. This moves the source3 based names.tdb (which is unused so far) to the lock directory, source4 does not have a cache directory. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messaging4: Use server_id_dbVolker Lendecke2015-02-132-126/+30
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messaging4: Fix typesVolker Lendecke2014-11-271-2/+12
| | | | | | | | | | | | | | | | According to python docs, PyArg_ParseTuple takes "int" and "unsigned long long". With pointers down to functions, in particular with varargs, there is no automatic conversion. So we need to be very strict about types. Automatic conversion to for example uint64_t happes only with assignment. This fixes a crash on FreeBSD10/clang. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Böhme <rb@sernet.de> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu Nov 27 21:32:18 CET 2014 on sn-devel-104
* s4:lib/messaging: remove unused allow_warnings=TrueStefan Metzmacher2014-11-251-1/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* messaging4: Fix an error path memleakVolker Lendecke2014-09-181-0/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* messaging4: Simplify imessaging_pathVolker Lendecke2014-07-291-9/+4
| | | | | | | | | | Use server_id_str_buf Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Jul 29 00:30:55 CEST 2014 on sn-devel-104
* messaging4: Simplify ping_message with server_id_str_buf()Volker Lendecke2014-07-241-3/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messaging4: Fix a just-introduced error memleakVolker Lendecke2014-07-221-0/+5
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Jul 22 15:31:38 CEST 2014 on sn-devel-104
* messaging4: Change irpc_servers_by_name to NTSTATUSVolker Lendecke2014-07-213-30/+36
| | | | | | | | | | | | For me, counted arrays are easier to deal with than NULL-terminated ones. Here we also had a "server_id_is_disconnection" convention, which was not really obvious. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Jul 21 20:28:53 CEST 2014 on sn-devel-104
* messaging4: Fix a memleak in an error pathVolker Lendecke2014-07-211-0/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messaging4: Remove unnecessary lockingVolker Lendecke2014-07-211-6/+0
| | | | | | | | We don't do any modifying operations on the database, so locking is not needed here Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messaging4: Remove an unused NTSTATUS varVolker Lendecke2014-07-211-2/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messaging4: Move str_list_addVolker Lendecke2014-07-211-6/+7
| | | | | | | | If this fails, we'd have to revert the tdb_append. str_list_remove is simpler :-) Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messaging4: Add NULL check to irpc_add_nameVolker Lendecke2014-07-211-0/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messaging4: Use tdb_append in irpc_add_nameVolker Lendecke2014-07-211-19/+11
| | | | | | | This makes the custom locking code unnecessary here Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4-messaging: Make header guard less genericAndrew Bartlett2014-06-041-2/+2
| | | | | | Change-Id: I659bbb317e69aee6632db8bce3c4bdb5f9ad3d8d Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* imessaging: Fix a commentVolker Lendecke2014-05-311-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:imessaging: Remove event context from irpc and imessaging structuresAndrew Bartlett2014-05-132-23/+19
| | | | | | | | | | | | | | | | | | | The only part of this code with a stored event context is now the binding_handle created by irpc_binding_handle() when in the client dcerpc_binding_handle_set_sync_ev() is called, otherwise a new nested event context is created for sync calls. Note that the FD event associated with the socket still implies the long term event context passed to imessaging_[client]_init(). Andrew Bartlett Change-Id: I9aeae94b26e3736370f449daa96808e6cdc2d55d Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue May 13 02:33:24 CEST 2014 on sn-devel-104
* s4:imessaging: Remove dcerpc_binding_handle_set_sync_ev() call from ↵Andrew Bartlett2014-05-131-2/+0
| | | | | | | | | | irpc_binding_handle() The callers do this explicitly now if required. Change-Id: I0e6f562aac4e3c0a75149c5850eb9f96269a3caf Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:irpc/tests: explicitly use dcerpc_binding_handle_set_sync_ev()Andrew Bartlett2014-05-131-0/+10
| | | | | | | | | | | | This indicates that we're using nested event loops... Andrew Bartlett Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Change-Id: I17d530a1f338cfdbd2e4e755b6f01a44a3e7ba7a Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s4:irpc/tests: make use explicit use of the top level event contextAndrew Bartlett2014-05-131-5/+6
| | | | | | | | Andrew Bartlett Change-Id: Ia193f97f62a1cb928aa814679578f90bde212013 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:lib/messaging: explicitly use allow_warnings=TrueStefan Metzmacher2014-04-021-2/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:lib/tests: add missing #include "torture/local/proto.h"Stefan Metzmacher2014-04-022-1/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* messaging4: Simplify irpc_namedb_open a bitVolker Lendecke2014-03-311-5/+5
| | | | | | | | It does not really need the msg_ctx, and it also removes the implicit talloc hierarchy. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* messaging4: Remove lp_ctx from imessaging_contextVolker Lendecke2014-03-311-13/+7
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* messaging4: Store a names_db handle in the imessaging_contextVolker Lendecke2014-03-311-36/+12
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* messaging4: Add some NULL checksVolker Lendecke2014-03-311-0/+15
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* messaging4: Add "goto fail" to imessaging_initVolker Lendecke2014-03-311-12/+9
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tdb_wrap: Remove tdb_wrap_open_ againVolker Lendecke2014-03-311-4/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* imessaging: Avoid passing lp_ctx to tdb_wrap_open in irpc_namedb_openVolker Lendecke2014-03-311-1/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Fix blank line endingsVolker Lendecke2014-03-311-29/+29
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/messaging: Check the server_id type correctlyAndrew Bartlett2013-09-191-1/+1
| | | | | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Sep 19 23:19:16 CEST 2013 on sn-devel-104
* Move python modules from source4/scripting/python/ to python/.Jelmer Vernooij2013-03-021-1/+1
| | | | | | | Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sat Mar 2 03:57:34 CET 2013 on sn-devel-104
* pymessaging: Pass around the server_id struct to python callbacks rather ↵Andrew Bartlett2013-01-261-3/+13
| | | | | | | | | | than the tuple This is not used currently, but may avoid going to and from the python types when we do not need to. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
* pymessaging: Use correct unsigned types for server ID tuple elememntsAndrew Bartlett2013-01-261-3/+3
| | | | | | | | | This is needed if we start using the top bits of these values. Andrew Bartlett Reviewed-by: Matthieu Patou <mat@matws.net> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Use the new directory_create_or_exist_strict() function.Andreas Schneider2013-01-091-1/+1
| | | | Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:lib/messaging: terminate the irpc_servers_byname() result with ↵Stefan Metzmacher2013-01-092-4/+4
| | | | | | | | server_id_set_disconnected() (bug #9540) Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4-lib: Use directory_create_or_exist() to create messaging dir.Andreas Schneider2012-12-211-1/+6
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
* pymessaging: Add irpc_servers_byname() and irpc_all_servers()Andrew Bartlett2012-10-311-0/+99
| | | | | | This will allow python scripts to inspect the process list. Andrew Bartlett
* pymessaging: Use the server_id IDL structure rather than a tupleAndrew Bartlett2012-10-311-5/+20
| | | | | | | This will make it easier to pass this structure in and out. The tuple is still accepted as input. Andrew Bartlett
* imessaging: Add irpc_all_servers() to list all available serversAndrew Bartlett2012-10-312-0/+73
| | | | | | | | This is implemented with a tdb_traverse_read(), and will allow a tool to disover the name and server_id of all Samba processes, as each process registers itself to recieve messages. Andrew Bartlett
* build: Add missing deps and make MESSAGING a private libraryAndrew Bartlett2012-06-071-2/+3
| | | | | | | | | To remove finddcs_nbt these missing deps need to be added. These subsystems linked to to implicit dependencies provided by finddcs. Due to the new arrangmenet of subsystems, MESSAGING needs to be a private library to avoid being a source of duplicate symbols. Andrew Bartlett
* UTIL_TDB: lowercase name.Jelmer Vernooij2012-05-031-1/+1
| | | | | Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Thu May 3 20:18:22 CEST 2012 on sn-devel-104
* s4-messaging: Fill in the whole server_id in all use casesAndrew Bartlett2012-04-301-1/+6
| | | | | | | | | | | | This started per https://bugzilla.samba.org/show_bug.cgi?id=8872#c4 and avoids any possible collision with a different process. We also need to ensure that across a Samba installation on a single node that id.vnn is the same. Samba4 previously used 0, while Samba3 used NONCLUSTER_VNN. When a message is sent between these 'different' nodes, the error NT_STATUS_INVALID_DEVICE_REQUEST is raised. Andrew Bartlett
* s4-messaging: Use generate_random() to get a unique ID for messaging clientsAndrew Bartlett2012-04-251-1/+2
| | | | | | | | | | | | The call to random() resulted in duplicate values for s3fs configurations which, due to the forked child, all started with the same random seed. A future improvement would be to move to a proven unique value. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Wed Apr 25 11:43:40 CEST 2012 on sn-devel-104
* 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
* s4-messaging: fix pymessaging docstringAndrew Bartlett2012-02-081-3/+2
|