summaryrefslogtreecommitdiffstats
path: root/source4/lib/messaging/pymessaging.c
Commit message (Collapse)AuthorAgeFilesLines
* 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
* messaging4: Change irpc_servers_by_name to NTSTATUSVolker Lendecke2014-07-211-10/+8
| | | | | | | | | | | | 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
* 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>
* s4:lib/messaging: terminate the irpc_servers_byname() result with ↵Stefan Metzmacher2013-01-091-2/+2
| | | | | | | | server_id_set_disconnected() (bug #9540) Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@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
* s4-messaging: fix pymessaging docstringAndrew Bartlett2012-02-081-3/+2
|
* s4-messaging: Pass the loadparm context, not just the messaging pathAndrew Bartlett2011-10-131-13/+14
| | | | | | This will allow the TDB layer to get at the lp_ctx for tdb options. Andrew Bartlett
* s4-messaging: fixed the removal of messaging sockets in child tasksAndrew Tridgell2011-07-221-5/+5
| | | | | | | | | | | | | | when a child task exits we were firing a destructor on any inherited messaging contexts, which could trigger a removal of the parents message socket and messaging database entry. This adds a new auto_remove flag to imessaging_init(), and exposes the cleanup code for use by the stream service. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Fri Jul 22 08:09:06 CEST 2011 on sn-devel-104
* server_id.idl: Bring server_id.idl in commonAndrew Bartlett2011-06-091-1/+1
| | | | | | Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s4-cluster Use task_id instead of id2 to clarify server_id structureAndrew Bartlett2011-06-091-6/+6
| | | | | | | | This seems a clearer and more acceptable name. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s4-messaging Rename messaging -> imessagingAndrew Bartlett2011-05-031-48/+48
| | | | | | | This avoid symbol and structure conflicts between Samba3 and Samba4, and chooses a less generic name. Andrew Bartlett
* s4-cluster Rename server_id.node -> vnn to match Samba3Andrew Bartlett2011-05-031-4/+4
|
* s4:cluster Rename .id to .pid in server_idAndrew Bartlett2011-05-031-6/+6
| | | | | | | This also changes some DEBUG messages to use cluster_id_string() rather than .id, to isolate them from this and other changes. Andrew Bartlett
* s4-idl: rename s4 server_id.idl to server_id4.idlAndrew Tridgell2011-02-181-1/+1
| | | | | | this avoids a conflict with the new s3 server_id.idl Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* s4-python: Only set BASETYPE flag if subclassing is supported.Jelmer Vernooij2011-01-011-2/+2
| | | | | Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Jan 1 03:39:58 CET 2011 on sn-devel-104
* s4-python: Add more prototypes.Jelmer Vernooij2011-01-011-0/+2
|
* Avoid the use of PyAPI_DATA, which is for internal Python API's.Arnaud Faucher2010-11-221-1/+1
| | | | | | | Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Mon Nov 22 00:52:56 CET 2010 on sn-devel-104
* pymessaging: Remove unused older python irpc bindings.Jelmer Vernooij2010-09-211-349/+3
|
* s4:lib/messaging: use irpc_binding_handle() for python bindingsStefan Metzmacher2010-09-031-13/+57
| | | | metze
* pidl: Keep only a single copy of samba.dcerpc.base.ClientConnection.Jelmer Vernooij2010-09-031-1/+1
|
* s4-loadparm: 2nd half of lp_ to lpcfg_ conversionAndrew Tridgell2010-07-161-2/+2
| | | | | | | this converts all callers that use the Samba4 loadparm lp_ calling convention to use the lpcfg_ prefix. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* Finish removal of iconv_convenience in public API's.Jelmer Vernooij2010-05-181-4/+0
|
* pytalloc: ensure talloc_ctx is directly after PyObject_HEADAndrew Tridgell2010-04-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | the talloc python interface for tp_alloc and tp_dealloc relies on a cast to a py_talloc_Object to find the talloc_ctx (see py_talloc_dealloc). This means we rely on the talloc_ctx for the object being directly after the PyObject_HEAD This fixes the talloc free with references bug in samba_dnsupdate The actual problem was the tp_alloc() call in PyCredentialCacheContainer_from_ccache_container() which used a cast from a py_talloc_Object to a PyCredentialCacheContainerObject. That case effectively changed the parent/child relationship between the talloc_ctx and the ccc ptr. This patch changes all the structures that follow this pattern to put the TALLOC_CTX directly after the PyObject_HEAD, to ensure that if anyone else decides to do a dangerous cast like this that it won't cause the same sort of subtle breakage. Pair-Programmed-With: Rusty Russell <rusty@samba.org>
* s4:lib/messaging: pymessaging needs libndr.hStefan Metzmacher2010-03-231-0/+1
| | | | metze
* s4:Remove "Py_RETURN_NONE" compatibility codeMatthias Dieter Wallnöfer2010-02-091-4/+0
| | | | This was needed only by Python 2.3 which we no longer support.
* s4:lib/messaging - fix up the python bindingsMatthias Dieter Wallnöfer2009-11-071-5/+6
| | | | | | This fixes up the broken "send" method of the python bindings and corrects some other parameter lists in parsing functions (this is only cosmetic). The reason for the bug was a superfluous "|"!
* s4-python: we need to include Python.h firstAndrew Tridgell2009-10-231-1/+1
| | | | | If we don't include Python.h first then we get a pile of warnings due to broken redefines of XOPEN_SOURCE in the Python includes.
* Fix unresolved symbol in python messaging module.Jelmer Vernooij2009-06-021-3/+1
|
* s4:lib/messaging: s/private/private_dataStefan Metzmacher2009-02-021-2/+2
| | | | metze
* Avoid using a utility header for Python replacements included in Samba,Jelmer Vernooij2009-01-081-1/+5
| | | | since this will not be shipped with talloc/tdb/tevent/etc.
* s3/s4 build: Fix Py_RETURN_NONE to work with python versions < 2.4Tim Prouty2009-01-071-1/+1
|
* py: Properly increase the reference counter of Py_None.Jelmer Vernooij2009-01-061-4/+4
|
* s4:lib/tevent: rename structsStefan Metzmacher2008-12-291-2/+2
| | | | | | | | | | | | | | | | | | | | list="" list="$list event_context:tevent_context" list="$list fd_event:tevent_fd" list="$list timed_event:tevent_timer" for s in $list; do o=`echo $s | cut -d ':' -f1` n=`echo $s | cut -d ':' -f2` r=`git grep "struct $o" |cut -d ':' -f1 |sort -u` files=`echo "$r" | grep -v source3 | grep -v nsswitch | grep -v packaging4` for f in $files; do cat $f | sed -e "s/struct $o/struct $n/g" > $f.tmp mv $f.tmp $f done done metze
* Remove includes of py_*.h, which are no longer generated.Jelmer Vernooij2008-12-221-1/+3
|
* Use consistent names for dcerpc python modules; fixes messaging test.Jelmer Vernooij2008-12-221-3/+5
|
* Remove use of global loadparm in python modules.Jelmer Vernooij2008-11-021-2/+7
|
* Remove more uses of global_loadparm.Jelmer Vernooij2008-10-241-2/+2
|
* Remove a few more usages of global_loadparm.Jelmer Vernooij2008-10-241-2/+2
|
* Eliminate another instance of global_loadparm.Jelmer Vernooij2008-10-241-2/+3
|
* Use a custom init function for samba4 that sets a samba4Simo Sorce2008-06-141-2/+2
| | | | | | | | specific debug function. By default do not debug, this is the most appropriate action for a library as we cannot assume what stderr is use for in the main app. The main app is responsible to set ev_debug_stderr if they so desire. (This used to be commit e566a2f308ac6fb4b526a744f7059b565670aea5)
* two more places where the wrong type is passed to PyArg_ParseTupleAndKeywords()Andrew Tridgell2008-05-301-4/+6
| | | | (This used to be commit db6122ec104e80ee2e02b1170ff808b6456b780b)
* fixed a segv in the python messaging code on 64 bit systemsAndrew Tridgell2008-05-301-1/+4
| | | | (This used to be commit 7598c8389745fcc77da341b4af2dcef6a01db700)
* Finish smbstatus in Python.Jelmer Vernooij2008-05-261-0/+3
| | | | (This used to be commit 988508c2d3269cc88ed38df2fc207a1c0aaccc6b)
* Allow using IRPC functions on the messaging bus from Python.Jelmer Vernooij2008-05-261-0/+556
(This used to be commit 6ecf81ae13dffa05356c1177c617206c120fb7d7)