summaryrefslogtreecommitdiff
path: root/source4/librpc
Commit message (Collapse)AuthorAgeFilesLines
* librpc: add Python mdssvc bindingsRalph Boehme2019-10-091-0/+7
| | | | | | | Not used for now, but soon. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Noel Power <noel.power@suse.com>
* librpc: Fix CID 1452292 Null pointer dereferences (REVERSE_INULL)Volker Lendecke2019-08-141-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s4:librpc/rpc: Use generic roh_connect_channel_send/recvSamuel Cabrero2019-08-073-219/+18
| | | | | | | | | | The HTTP connection code is common to in and out channels. Signed-off-by: Samuel Cabrero <scabrero@suse.de> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Wed Aug 7 14:12:40 UTC 2019 on sn-devel-184
* s4:librpc/rpc: Add roh_connect_channel_send/recvSamuel Cabrero2019-08-071-0/+100
| | | | | | | | Generic function to connect a ROH channel. The use comes later to avoid duplicated code. Signed-off-by: Samuel Cabrero <scabrero@suse.de> Reviewed-by: Ralph Boehme <slow@samba.org>
* s4:lib/http: move to the toplevelRalph Boehme2019-08-074-4/+4
| | | | | | | This is going to be used from the s3 RPC server soon... Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Samuel Cabrero <scabrero@suse.de>
* s4:lib/http: use http_conn in http_send_request_send() and ↵Ralph Boehme2019-08-072-18/+3
| | | | | | | | | | | | | | | | http_read_response_send() Works, tested with $ bin/smbtorture -W RIVERSIDE --realm=RIVERSIDE.SITE -s /dev/null \ -U Administrator%Passw0rd \ ncacn_http:10.10.11.164[HttpProxy=10.10.11.164:593,HttpUseTls=false,HttpAuthOption=basic,HttpConnectOption=UseHttpProxy] \ rpc.epmapper.epmapper.Lookup_simple I get an ACCESS_DENIED error, but I get it over HTTP. :) Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Samuel Cabrero <scabrero@suse.de>
* s4:librpc/rpc: use http_connect_send/recv in ncacn_httpRalph Boehme2019-08-074-214/+104
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Samuel Cabrero <scabrero@suse.de>
* dcerpc: use anon creds for unknown transportDouglas Bagnall2019-07-221-0/+5
| | | | | | | | | | | | Otherwise we get a segfault when the NULL creds are dereferenced in cli_credentials_is_anonymous() $ python3 -c"from samba.dcerpc.dnsserver import dnsserver; d = dnsserver('addc')" Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Mon Jul 22 23:37:57 UTC 2019 on sn-devel-184
* s4/rpc/py_security: don't deref NULL for invalid valuesDouglas Bagnall2019-07-221-2/+10
| | | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* librpc: Do not generate extra unused client or python bindings with PIDLAndrew Bartlett2019-06-261-2/+7
| | | | | | | | This sorts out the idl list into the parts that actually need --python and --client specified and so speeds up the compile and clarifies the code behaviour. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* librpc: Remove frsblobs.idlAndrew Bartlett2019-06-261-1/+0
| | | | | | | | We can now dump public structures using ndrdump, so helper dump functions are not required any more. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* librpc: Remove unused RPC_NDR_SERVER_IDAndrew Bartlett2019-06-261-1/+1
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* librpc: Remove unused RPC_NDR_NBTAndrew Bartlett2019-06-261-1/+1
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* librpc: Remove unused RPC_NDR_WINSIFAndrew Bartlett2019-06-261-5/+0
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* librpc: Remove unused RPC_NDR_XATTRAndrew Bartlett2019-06-261-2/+2
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* librpc: Remove unused RPC_NDR_DRSBLOBSAndrew Bartlett2019-06-261-1/+1
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* librpc: Remove unused RPC_NDR_NTLMSSPAndrew Bartlett2019-06-261-1/+1
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* py3: Remove duplicated PyUnicode_Check() after the py3 compat macros were ↵Andrew Bartlett2019-06-241-2/+2
| | | | | | | | | | | | removed This came about because in py2 we had to check for strings and unicode. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Noel Power <noel.power@suse.com> Autobuild-User(master): Noel Power <npower@samba.org> Autobuild-Date(master): Mon Jun 24 18:48:53 UTC 2019 on sn-devel-184
* py3: Remove PyStr_AsUTF8AndSize() compatability macroAndrew Bartlett2019-06-241-1/+1
| | | | | | | | We no longer need Samba to be py2/py3 compatible so we choose to return to the standard function names. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Noel Power <noel.power@suse.com>
* py3: Remove PyStr_AsString() compatability macroAndrew Bartlett2019-06-241-1/+1
| | | | | | | | We no longer need Samba to be py2/py3 compatible so we choose to return to the standard function names. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Noel Power <noel.power@suse.com>
* py3: Remove PyStr_FromFormat() compatability macroAndrew Bartlett2019-06-243-5/+5
| | | | | | | | We no longer need Samba to be py2/py3 compatible so we choose to return to the standard function names. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Noel Power <noel.power@suse.com>
* py3: Remove PyStr_FromString() compatability macroAndrew Bartlett2019-06-245-9/+9
| | | | | | | | We no longer need Samba to be py2/py3 compatible so we choose to return to the standard function names. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Noel Power <noel.power@suse.com>
* py3: Remove PyStr_Check() compatability macroAndrew Bartlett2019-06-241-2/+2
| | | | | | | | We no longer need Samba to be py2/py3 compatible so we choose to return to the standard function names. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Noel Power <noel.power@suse.com>
* winsrepl.idl: remove unused decode functionsGary Lockyer2019-06-061-5/+0
| | | | | | | | Remove the decode_* functions as they are no longer needed, and this will reduce the amount of untested automatically generated code. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* sasl_helpers.idl: remove unused decode functionsGary Lockyer2019-06-061-4/+0
| | | | | | | | Remove the decode_* functions as they are no longer needed, and this will reduce the amount of untested automatically generated code. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* ntp_signd.idl: remove unused decode functionsGary Lockyer2019-06-061-6/+0
| | | | | | | | Remove the decode_* functions as they are no longer needed, and this will reduce the amount of untested automatically generated code. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4 lib rpc pyrpc: Fix error messageGary Lockyer2019-05-301-1/+2
| | | | | | | | | Fix the error message returned when unable to initialise an event context. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4 librpc rpc pyrpc: Fix flapping dcerpc.bare testsGary Lockyer2019-05-221-5/+2
| | | | | | | | | | | | | Commit d65b7641c84976c543ded8f0de5ab2da3c19b407 had the parameters to talloc_reparent reversed. This caused the dcerpc.bare tests to flap. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13932 Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Gary Lockyer <gary@samba.org> Autobuild-Date(master): Wed May 22 03:03:43 UTC 2019 on sn-devel-184
* s4/librpc: squash 'cast between incompatible function types' warningNoel Power2019-05-163-7/+18
| | | | | | | | | | Where possible make PyCFunction definition signature match. Sometimes this is not possible (e.g. when the c-function is associated with a python method definition with 'METH_VARARGS|METH_KEYWORDS' in this case we use the PY_DISCARD_FUNC_SIG macro. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4 librpc rpc pyrpc: Ensure tevent_context deleted lastGary Lockyer2019-05-103-28/+39
| | | | | | | | | | | | | | Ensure that the tevent_context is deleted after the connection, to prevent a use after free. Note: Py_DECREF calls dcerpc_interface_dealloc so the TALLOC_FREE(ret->mem_ctx) calls in the error paths of py_dcerpc_interface_init_helper needed removal. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13932 Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pyrpc: remove crutch for python <= 2.5Douglas Bagnall2019-05-091-4/+0
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* pyrpc: ndr PY_CHECK_TYPE checks for NULL as well as typeDouglas Bagnall2019-05-091-4/+13
| | | | | | | Addresses CID 1361477 and others. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* s4/rpc/dcerpc_roh_channel_out: check ndr_init (CID 1273062)Douglas Bagnall2019-05-091-0/+3
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* s4/rpc/dcerpc_roh_channel_out: check ndr_init (CID 1273065)Douglas Bagnall2019-05-091-0/+3
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* libnet: Remove unused source4/libnet/libnet_sam{dump,sync}:Andrew Bartlett2019-05-063-44/+0
| | | | | | | | | | | | | | | | The last caller was removed in samba-tool: Remove C version of samba-tool (e2af38415163f248e3dbd5a2abc156761e74b87c) by Amitay Isaacs in 2011 This was a tool to dump a genine NT4 DC (never Samba) into smbpasswd file. It did work against Windows AD, but DRS replication is much more comprehensive. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Autobuild-User(master): Gary Lockyer <gary@samba.org> Autobuild-Date(master): Mon May 6 07:11:51 UTC 2019 on sn-devel-184
* build: Remove bld.gen_python_environments()Andrew Bartlett2019-03-211-296/+295
| | | | | | | This was part of --extra-python support. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* build: Remove --extra-pythonAndrew Bartlett2019-03-211-2/+0
| | | | | | | | | | | This option is quite invasive in waf and was mainly for the python3 transition. Testing with multiple python versions can be done by testing a full compile against multiple versions, likewise multiple different binding versions can be created the same way. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* s4:librpc: Fix installation of SambaAndreas Schneider2019-03-201-8/+0
| | | | | | | | | | | | This breaks installation of Samba 4.10 on Fedora. https://bugzilla.samba.org/show_bug.cgi?id=13847 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Mar 20 13:11:28 UTC 2019 on sn-devel-144
* s4/librpc/py_misc: ParseTuple format should match actual typesDouglas Bagnall2019-02-081-1/+1
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org>
* Clean up reference used with PyDict_SetxxxNoel Power2019-02-074-0/+4
| | | | | | | | | | | | PyDictSetxxx methods don't steal reference so if the items added to the dictionary were created just for the purpose of inserting into the dict then we need to decref them. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Autobuild-User(master): Noel Power <npower@samba.org> Autobuild-Date(master): Thu Feb 7 17:17:46 CET 2019 on sn-devel-144
* Cleanup references to module objects returned from PyImport_ImportModuleNoel Power2019-02-072-10/+26
| | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* s4/pyrpc_util: catch alloc failure in py_dcerpc_interface_init_helper()Douglas Bagnall2019-01-291-0/+5
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org>
* s4/pyrpc_util: appropriately decrement refcounts on failureDouglas Bagnall2019-01-291-0/+22
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org>
* pyrpc: typo in transfer syntax docstringDouglas Bagnall2019-01-281-1/+1
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4:librpc: Use C99 initializer for PyGetSetDef in pyrpcAndreas Schneider2019-01-281-18/+41
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* s4:librpc: Use C99 initializer for PyGetSetDef in py_authAndreas Schneider2019-01-171-2/+6
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* s4:pyrpc: add py_dcerpc_ndr_pointer_deref/wrap() infrastructureStefan Metzmacher2019-01-123-0/+133
| | | | | | | | | | | | | | | | | | | | Some idl files use more than one layer of unique pointers. e.g. NTSTATUS lsa_GetUserName( [in,unique] [string,charset(UTF16)] uint16 *system_name, [in,out,ref] lsa_String **account_name, [in,out,unique] lsa_String **authority_name ); In order to specify *io.in.authority_name = NULL, we need to wrap the pointer value (lsa_String or None) into an base.ndr_pointer() object. BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113 BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:pyrpc: make use of pytalloc_get_type() in py_dcerpc_syntax_init_helper()Stefan Metzmacher2019-01-121-1/+1
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113 BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* pysecurity: Use dom_sid_str_bufVolker Lendecke2019-01-081-6/+5
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:librpc: add python winspool bindingsStefan Metzmacher2018-12-231-0/+6
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>