summaryrefslogtreecommitdiff
path: root/source4/librpc
Commit message (Collapse)AuthorAgeFilesLines
* s4:librpc: Fix installation of SambaAndreas Schneider2019-03-261-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> (cherry picked from commit bf469343f577e2d78df0e38d80e7976b351eaf0d) Autobuild-User(v4-8-test): Karolin Seeger <kseeger@samba.org> Autobuild-Date(v4-8-test): Tue Mar 26 12:30:35 UTC 2019 on sn-devel-144
* s4:librpc: autonegotiate SMB1/2/3Stefan Metzmacher2018-08-131-139/+120
| | | | | | | | | | | | Windows Server 1709 defaults to SMB2 and does not have SMB1 enabled. When establishing trust, samba-tool does not specify SMB protocol version and fail by default. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13308 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> (cherry picked from commit 4422f7382aad3090cb959ade030a02bf4fef81ac)
* s4:libcli: add fallback_to_anonymous to smb2_connect_send()Stefan Metzmacher2018-08-131-0/+1
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13308 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> (cherry picked from commit ca000d8901e6acb8a7c59d26d4f75c9d92bafece)
* s4:libcli: allow passing an already negotiated connection to smb2_connect_send()Stefan Metzmacher2018-08-131-0/+1
| | | | | | | | | | It will just do the session setup and tree connect steps. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13308 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> (cherry picked from commit f20e607c15b4c8ae56ade5d7e68d832542a2cd5e)
* librpc-build: ignore unused functions in generated codeUri Simchoni2017-11-221-35/+74
| | | | | | | | | | | Some pidl-generated code includes static functions that are to be optimized-away by the compiler if not used. When running picky developer with clang that breaks the build. This change ignores this warning for the pidl-generated python binding files. Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* python: Port samba.messaging module to Python 3 compatible form.Lumir Balhar2017-10-231-1/+1
| | | | | | Signed-off-by: Lumir Balhar <lbalhar@redhat.com> Reviewed-by: Andrew Bartlet <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* xattr.idl: Don't generate an interface tableVolker Lendecke2017-10-221-1/+0
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Sun Oct 22 21:40:16 CEST 2017 on sn-devel-144
* nfs4acls: Don't generate an interface table for nfs4acls.idlVolker Lendecke2017-10-221-1/+0
| | | | | | | | | | | | | Nobody uses the function nfs4acl_test. It took a while to figure out how to get this to build. The "uuid" line in the idl file triggers pidl to generate the function table entry, which in turn then triggers tables.pl to register this interface ./bin/default/source4/librpc/gen_ndr/tables.c. We could for example do the same with xattr_parse_DOSATTRIB. Nobody uses this. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* Install dcerpc/__init__.py for all Python environmentsAlexander Bokovoy2017-09-141-5/+6
| | | | | | | | | | | | Also fix whitespace. We use tabs, not spaces in Python/waf code. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13030 Signed-off-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Sep 14 22:29:39 CEST 2017 on sn-devel-144
* lib: talloc: Use the system <talloc.h> include.Jeremy Allison2017-08-172-2/+2
| | | | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Aug 17 00:53:48 CEST 2017 on sn-devel-144
* lib: tevent: Use system <tevent.h>, not internal header path (except in ↵Jeremy Allison2017-08-162-2/+2
| | | | | | | self-test). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* py-librpc: Strictly check the type of the incoming sid pointerAndrew Bartlett2017-08-151-0/+7
| | | | | | | | | | This avoids casting another type of object to a void* and then to a SID Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Autobuild-User(master): Garming Sam <garming@samba.org> Autobuild-Date(master): Tue Aug 15 12:00:58 CEST 2017 on sn-devel-144
* s4:librpc/rpc: add support for HttpAuthOption=negotiateStefan Metzmacher2017-08-071-0/+2
| | | | | | | | Note that rpcproxy.dll on Windows doesn't support kerberos, it allways downgrades the connection to NTLMSSP. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4:librpc/rpc: pass down HTTP_AUTH_* values directly to ↵Stefan Metzmacher2017-08-074-16/+15
| | | | | | | | | dcerpc_pipe_open_roh_send() They get passed to http_send_auth_request_send() unmodified. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4:librpc/rpc: remember the target_hostname on ncacn_http connectionsStefan Metzmacher2017-08-071-0/+5
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4:lib/http: let http_read_response_send/recv() also consume the body if it ↵Stefan Metzmacher2017-08-071-1/+2
| | | | | | | | | | | | | | | | | | | fits into a max value We need to consume full HTTP responses from the socket during the authentication exchanges, otherwise our HTTP parser gets out of sync for the next requests. This will be important for gensec mechs which use an even number for authentication packets. I guess this should be done just based on the Content-Length value and not based on the response code. So far I saw bodies with 200 and 401 codes. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* Build py3 versions of other rpc modulesAlexander Bokovoy2017-07-141-121/+121
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12905 Signed-off-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Alexander Bokovoy <ab@samba.org> Autobuild-Date(master): Fri Jul 14 11:36:53 CEST 2017 on sn-devel-144
* lsa.String: add String constructor, str and reprGary Lockyer2017-06-221-0/+77
| | | | | | | | | Add a String constructor, str and repr methods to the samba.dcerpc.lsa.String python object Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:librpc: restore inhibit_timeout_processing = true during ↵Stefan Metzmacher2017-05-301-0/+10
| | | | | | | | | | | gensec_update_send/recv() As not all gensec backends are fully async yet, we need the inhibit_timeout_processing workarround in order to protect against nested event loops. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Revert "s4:librpc: simplify dcerpc_connect_timeout_handler() logic"Stefan Metzmacher2017-05-302-1/+17
| | | | | | | | | | | | This reverts commit 2c3e99d1697b83f7dd498596a274fe2e8e96116d. As the source4 backends for kerberos still use nested event loops, we need to restore this for now. We should reapply this once all backends are fully async. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:librpc: simplify dcerpc_connect_timeout_handler() logicStefan Metzmacher2017-05-212-17/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:librpc: make use of gensec_update_send() in bind_auth_next_step()Stefan Metzmacher2017-05-211-12/+23
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:librpc: use gensec_update_send() in dcerpc_bind_auth_send()Stefan Metzmacher2017-05-211-19/+34
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:librpc: ask for GENSEC_FEATURE_SIGN_PKT_HEADER after the gensec_update() ↵Stefan Metzmacher2017-05-211-4/+7
| | | | | | | | | | | dance Most features should be added before the update() dance, while GENSEC_FEATURE_SIGN_PKT_HEADER needs to be after the dance on the client side. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pyrpc: Fix segfault in ClientConnectionGary Lockyer2017-04-211-0/+8
| | | | | | | | | | | | | Fix segfault when connecting over TCP, the endpoints list in dummy_table was not initialised this caused a segfault when attempting to connect over TCP. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlet <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri Apr 21 16:10:12 CEST 2017 on sn-devel-144
* build: correct package dependenciesJan Engelhardt2017-04-182-2/+2
| | | | | | | | | | | | | | | | | | | | | | The wscript_build files convey what header files belong to which logical package. For example, # lib/util/wscript_build: bld.SAMBA_LIBRARY('samba-util', public_headers='... data_blob.h ...' # auth/credentials/wscript_build: bld.SAMBA_LIBRARY('samba-credentials', public_headers='credentials.h', Now, credentials.h #includes <util/data_blob.h> and therefore, samba-credentials.pc must have a Requires: samba-util. Similarly for other parts. Signed-off-by: Jan Engelhardt <jengelh@inai.de> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* python: Add bindings for NTLMSSPAndrew Bartlett2017-03-291-0/+6
| | | | | | This is helpful for building NTLMv2 packets in python for testing against the SamLogon server Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* python: Provide Python bindings for messaging.idlAndrew Bartlett2017-03-281-0/+6
| | | | | | | | | | This will allow AUTH_EVENT_NAME and MSG_AUTH_LOG to be accessed from python Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Mar 28 13:19:03 CEST 2017 on sn-devel-144
* waf: disable-python - don't build pyrpc_util, dcerpc.pyIan Stakenvicius2017-03-101-2/+4
| | | | | | Signed-off-by: Ian Stakenvicius <axs@gentoo.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* python: wscript_build: Build some DCE/RPC modules with Python 3Lumir Balhar2017-03-101-75/+67
| | | | | | | | | | Samba.auth Python module depends on a lot of DCE/RPC modules which have to be built with Python 3 to make port of samba.auth to Python 3 possible. Signed-off-by: Lumir Balhar <lbalhar@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* python: samba.dcerpc: Port security module to Python 3 comp. formLumir Balhar2017-03-101-4/+36
| | | | | | Signed-off-by: Lumir Balhar <lbalhar@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* python: samba.dcerpc: Port RPC related stuff to Python 3Lumir Balhar2017-03-105-44/+94
| | | | | | | | | | Port RPC related stuff like samba.dcerpc.misc and samba.dcerpc Python modules and pyrpc_util to Python 3 compatible form. Signed-off-by: Lumir Balhar <lbalhar@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Pair-programmed-by: Andrew Bartlett <abartlet@samba.org>
* pidl:Python: use of pytalloc_GenericObject_reference*() for ↵Stefan Metzmacher2017-02-251-40/+4
| | | | | | | | | | | | pyrpc_{ex,im}port_union() wrapping BUG: https://bugzilla.samba.org/show_bug.cgi?id=12601 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sat Feb 25 06:33:33 CET 2017 on sn-devel-144
* tests/ndrdump: Add a test for --hex-inputGarming Sam2017-02-141-0/+7
| | | | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Feb 14 13:39:01 CET 2017 on sn-devel-144
* wscript: remove executable bits for all wscript* filesStefan Metzmacher2017-01-111-0/+0
| | | | | | | | | | These files should not be executable. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Wed Jan 11 20:21:01 CET 2017 on sn-devel-144
* s4:librpc/rpc: make sure we handle DCERPC_PACKET before DCERPC_CONNECTStefan Metzmacher2017-01-021-2/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4:librpc/rpc: don't do an anonymous bind over ncacn_np:server[packet]Stefan Metzmacher2017-01-021-1/+1
| | | | | | | | DCERPC_AUTH_LEVEL_PACKET is basically the same as DCERPC_AUTH_LEVEL_INTEGRITY. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* librpc: Introduce cab.idlGünther Deschner2016-11-241-12/+60
| | | | | | | | | | This allows processing of Windows Cabinet files (required for the MS-PAR print protocol implementation) Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4:pyrpc: remove unused py_{import,export}_netr_* prototypesStefan Metzmacher2016-10-261-13/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4:pyrpc: add pyrpc_{im,ex}port_union() helper functionsStefan Metzmacher2016-10-262-0/+98
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4:librpc/rpc: pass the object guid to the binding handle if requiredStefan Metzmacher2016-10-264-21/+30
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4:librpc/rpc: no longer set FLAG_OBJECT_PRESENT and FLAG_BIGENDIAN for ↵Stefan Metzmacher2016-10-261-8/+0
| | | | | | | | | ndr_push_ncacn_packet() This is no longer required, it's done inside. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4:librpc/rpc: make sure the DCERPC_CONCURRENT_MULTIPLEX and ↵Stefan Metzmacher2016-10-261-3/+18
| | | | | | | DCERPC_PFC_FLAG_CONC_MPX are in sync Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4:librpc/rpc: add support for DCERPC_AUTH_LEVEL_PACKETGünther Deschner2016-10-263-5/+7
| | | | | | | | Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Guenther Deschner <gd@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4-torture: test support for [packet] binding string option.Günther Deschner2016-10-261-0/+19
| | | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4:librpc/rpc: make use of dcerpc_ncacn_push_pkt_auth() in ↵Stefan Metzmacher2016-10-261-128/+13
| | | | | | | ncacn_push_request_sign() Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4:librpc/rpc: convert ncacn_pull_request_auth() into a generic ↵Stefan Metzmacher2016-10-261-11/+27
| | | | | | | ncacn_pull_pkt_auth() Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4:librpc/rpc: make use of dcerpc_ncacn_pull_pkt_auth() in ↵Stefan Metzmacher2016-10-261-94/+20
| | | | | | | ncacn_pull_request_auth() Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4:librpc/rpc: implement bind_time_feature negotiationStefan Metzmacher2016-10-262-4/+30
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4:librpc/rpc: force printing in dcerpc_bh_do_ndr_print() log level >= 11Stefan Metzmacher2016-10-261-2/+17
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>