Stefan Metzmacher
05b54f5a33
librpc/rpc: add ncacn_option_by_name()
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:14 +01:00
Stefan Metzmacher
afcd5506c9
librpc/rpc: remove dcerpc_binding->localaddress and store it in the options array
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:14 +01:00
Stefan Metzmacher
c327a60a02
librpc/rpc: let derpc_binding_string() add ncacn_options before key=value options
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:14 +01:00
Stefan Metzmacher
e4b246a968
librpc/rpc: handle "localaddress" in dcerpc_binding_[s|g]et_string_option()
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:14 +01:00
Stefan Metzmacher
5d22127118
librpc/rpc: keep talloc hierachie sane in dcerpc_parse_binding()
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:14 +01:00
Stefan Metzmacher
7c0985bb35
librpc/rpc: add dcerpc_binding_copy_string_option()
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:14 +01:00
Stefan Metzmacher
8dfba57c33
librpc/rpc: add dcerpc_binding_set_string_option()
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:14 +01:00
Stefan Metzmacher
6557b429ef
librpc/rpc: add dcerpc_binding_get_string_option()
...
This allows get value string of a [key=value] option
of the dcerpc_binding.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:14 +01:00
Stefan Metzmacher
3f40cde3ea
librpc/rpc: only interpret the first option as endpoint if there's no '=' in it.
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:14 +01:00
Stefan Metzmacher
33fa75c615
librpc/rpc: remove the options array in dcerpc_parse_binding() if not needed
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:14 +01:00
Stefan Metzmacher
09c5bd99b1
librpc/rpc: add some talloc checks to dcerpc_binding_string()
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:14 +01:00
Stefan Metzmacher
9a084b4ab2
librpc/rpc: add dcerpc_transport_by_name()
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-11 16:20:31 +01:00
Stefan Metzmacher
98b08dfb6d
librpc/rpc: simplify dcerpc_binding_build_tower()
...
dcerpc_floor_set_rhs_data() handles the special cases now
and we keep the 'host' part unmodified except
EPM_PROTOCOL_IP addresses. No special '\\' handling anymore.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-11 16:20:31 +01:00
Stefan Metzmacher
d89ff8575d
librpc/rpc: fix dcerpc_floor_set_rhs_data() with NULL data.
...
For EPM_PROTOCOL_IP we can only marshal ipv4 addresses,
everything else gets '0.0.0.0' (4 zero bytes on the wire).
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-11 16:20:31 +01:00
Stefan Metzmacher
b5eb5d97c2
librpc/rpc: handle dcerpc_binding->host == NULL in dcerpc_floor_get_rhs_data()
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-11 16:20:31 +01:00
Stefan Metzmacher
6ab76219cd
librpc/rpc: let dcerpc_floor_get_rhs_data() return 'char *'
...
We don't return any "const char *" values here, so give the caller
a chance to talloc_free() the result.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-11 16:20:28 +01:00
Gregor Beck
1fd4842701
librpc/rpc: add dcerpc_sec_verification_trailer_check()
...
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-11 16:02:14 +01:00
Gregor Beck
9c5664f58d
librpc/rpc: add dcerpc_sec_vt_header2_[from_ncacn_packet|equal]()
...
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-11 16:02:14 +01:00
Stefan Metzmacher
b7a53803f3
librpc/rpc: simplify tevent_req_nterror() usage in binding_handle.c
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-08 14:34:36 +01:00
Stefan Metzmacher
ef568f425c
librpc/rpc: read the full header in dcerpc_read_ncacn_packet_next_vector()
...
This helps wireshark reassamble the PDUs generated by socket_wrapper.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-01-07 08:37:36 +01:00
Stefan Metzmacher
7db1dc13b0
s4:librpc: always try to negotiate DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN
...
If the gensec backend supports it there's no reason not sign the header.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-01-07 00:27:11 +01:00
Stefan Metzmacher
dfd4fc1591
CVE-2013-4408:librpc: check for invalid frag_len within dcerpc_read_ncacn_packet_next_vector()
...
We should do this explicit instead of relying on
tstream_readv_pdu_ask_for_next_vector() to catch the overflow.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-12-09 07:05:45 +01:00
Stefan Metzmacher
2fb570abec
CVE-2013-4408:librpc: check for invalid frag_len within dcerpc_read_ncacn_packet_done()
...
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-12-09 07:05:45 +01:00
Stefan Metzmacher
a33b13bd61
librpc/rpc: add dcerpc_binding_handle_auth_info()
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-17 08:48:41 +13:00
Günther Deschner
40ee3d8a5f
librpc: add dcerpc_default_transport_endpoint() function.
...
Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-09-20 13:07:23 +02:00
Volker Lendecke
7701053806
librpc: Use tevent_req_simple_recv_ntstatus
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-12 14:00:07 -07:00
Volker Lendecke
9f25ad44a9
librpc: Shorten dcerpc_binding_handle_call a bit
...
... saves 200 bytes on 64 bit Linux with -O3
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): Fri Jun 14 22:27:43 CEST 2013 on sn-devel-104
2013-06-14 22:27:43 +02:00
Volker Lendecke
7982d2aff8
librpc: Use tevent_req_poll_ntstatus
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-06-14 20:30:33 +02:00
Andreas Schneider
e50874606f
librpc: Add NULL check for ndr functions for epm bindings.
...
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22 16:36:12 +01:00
Stefan Metzmacher
3d5bb24a7b
librpc/rpc: make use of samba_tevent_context_init()
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-19 23:47:45 +01:00
Andreas Schneider
426bcdb37c
librpc: Check return codes of ndr functions.
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
2012-12-21 13:56:00 +01:00
Stefan Metzmacher
780006db9d
s4:librpc/rpc: add DCERPC_SCHANNEL_AES support
...
metze
Signed-off-by: Günther Deschner <gd@samba.org>
2012-07-17 10:58:39 +02:00
Jelmer Vernooij
95ca5fbadd
libndr: Rename ndr64_transfer_syntax and null_ndr_syntax_id so they have a ndr_ prefix.
...
This makes the NDR namespace a bit clearer, in preparation of ABI checking.
2012-03-20 13:54:07 +01:00
Andreas Schneider
17d124490b
s4-librpc: Fix NETLOGON credential chain with Windows 2008.
...
Windows Server 2008 returns NT_STATUS_DOWNGRADE_DETECTED if you call
netrServerAuthenticate2 during a domain join without setting the strong
keys flag (128bit crypto).
Only for NT4 we need to do a downgrade to the returned negotiate flags.
See also 0970369ca0
.
2011-12-14 13:41:28 +01:00
Andrew Bartlett
a1f04e8abc
libcli/util Rename common map_nt_error_from_unix to avoid duplicate symbol
...
The two error tables need to be combined, but for now seperate the names.
(As the common parts of the tree now use the _common function,
errmap_unix.c must be included in the s3 autoconf build).
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Jun 20 08:12:03 CEST 2011 on sn-devel-104
2011-06-20 08:12:03 +02:00
Volker Lendecke
8d9cbc7c22
librpc: Add some error checking to dcerpc_floor_pack_rhs_if_version_data
2011-03-27 22:22:12 +02:00
Volker Lendecke
9370c28425
librpc: Fix Coverity ID 2198: NULL_RETURNS
2011-03-27 22:22:12 +02:00
Andreas Schneider
edc26007bf
librpc: Return an error if we a broken floor.
...
Pair-Programmed-With: Simo Sorce <idra@samba.org>
2011-03-24 14:57:13 -04:00
Simo Sorce
95daebe1c3
cleanup: fix some trailing spaces
2011-03-24 14:57:12 -04:00
Andreas Schneider
f534dcdca3
librpc: Added a dcerpc_binding_dup() function.
2011-03-24 14:57:12 -04:00
Günther Deschner
b903c28939
librpc: bring more librpc prototypes in common.
...
Guenther
2011-03-23 23:59:11 +01:00
Stefan Metzmacher
72c1fe0081
librpc/rpc: move DCERPC_ flags to rpc_common.h
...
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Mar 13 20:45:53 CET 2011 on sn-devel-104
2011-03-13 20:45:53 +01:00
Stefan Metzmacher
6539eba880
librpc/rpc: add dcerpc_binding_handle_raw_call()
...
metze
2011-03-13 16:53:05 +01:00
Stefan Metzmacher
08dca92499
librpc/rpc: move struct dcerpc_binding to rpc_common.h
...
metze
2011-03-13 16:53:05 +01:00
Stefan Metzmacher
83c55ac67e
librpc/rpc: move enum dcerpc_transport_t to rpc_common.h
...
metze
2011-03-13 16:33:06 +01:00
Stefan Metzmacher
b738e092a2
librpc/rpc: move dcerpc_binding_handle stuff to rpc_common.h
...
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Mar 11 12:28:08 CET 2011 on sn-devel-104
2011-03-11 12:28:08 +01:00
Andrew Tridgell
5ec284d152
build: moved librpc/rpc/*.c into a rpccommon library
...
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Feb 24 02:42:37 CET 2011 on sn-devel-104
2011-02-24 02:42:37 +01:00
Stefan Metzmacher
4d66e0ef93
librpc/rpc: add dcerpc_fault_to_nt_status() mapping from DCERPC_FAULT_SEC_PKG_ERROR
...
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Jan 30 18:24:04 CET 2011 on sn-devel-104
2011-01-30 18:24:04 +01:00
Andreas Schneider
da3e057b6f
librpc: Added support to accept netbios names.
...
If we have a NCACN_NP pipe, the binding host is the netbios name an not
an IP address.
2011-01-27 14:41:40 +01:00
Stefan Metzmacher
abeef470c4
librpc: Fixed memory context of dcerpc_binding_from_tower.
2010-10-18 14:03:21 +02:00
Andrew Tridgell
9bae4cd3d9
s4-rpc: added target_principal binding handle option
...
this allows you to specify a target SPN for a connection
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-01 22:31:57 -07:00
Andrew Tridgell
7ca69f7462
librpc: bitten by the strncasecmp define again
2010-09-07 14:33:20 +10:00
Julien Kerihuel
e5e5a1110f
Add unique IP address binding for client connections (EPM and ncacn_ip_tcp levels)
...
This allows for binding strings like this:
ncacn_ip_tcp:host[localaddress=192.168.2.1,seal]
which will force the connection to be locally bound to the specified
IP address
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-07 09:55:14 +10:00
Stefan Metzmacher
54d2dce7b1
librpc/rpc: add dcerpc_binding_handle_set_timeout()
...
metze
2010-09-04 09:01:19 +02:00
Stefan Metzmacher
fe7819ae6f
librpc/rpc: move dcerpc_read_ncacn_packet_send/recv() to dcerpc_util.c
...
metze
2010-08-20 18:09:25 +02:00
Stefan Metzmacher
ce60e8d697
librpc/rpc: call do_ndr_print hook in dcerpc_binding_handle_call*()
...
metze
2010-08-18 15:57:52 +02:00
Stefan Metzmacher
b34209006f
s4:librpc/rpc: make struct dcerpc_binding_handle private
...
metze
2010-08-12 14:31:21 +02:00
Stefan Metzmacher
4030bc9b2d
librpc/rpc: add dcerpc_binding_handle abstration
...
metze
2010-08-12 14:31:17 +02:00
Simo Sorce
b20e5eb3aa
dcerpc: Clarify what the arguments of dcerpc_pull_auth_trailer() actually represent.
2010-07-20 08:28:19 -04:00
Simo Sorce
65116adceb
s3-dcerpc: Fix ability to receive Big Endian PDUs
2010-07-16 16:02:39 -04:00
Simo Sorce
e340aa40d1
dcerpc: move dcerpc_pull_auth_trailer into a the common dcerpc_util.c file
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-13 14:44:10 +02:00
Günther Deschner
716f9d6847
s4-dcerpc: move some util functions up to main librpc directory.
...
Guenther
Signed-off-by: Simo Sorce <idra@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-13 14:44:09 +02:00
Jelmer Vernooij
f9ca9e46ad
Finish removal of iconv_convenience in public API's.
2010-05-18 11:45:30 +02:00
Matthias Dieter Wallnöfer
f1974fbdf9
librpc:dcerpc_error.c - fix a warning
2010-05-09 10:22:55 +02:00
Stefan Metzmacher
fed16f4015
librpc/rpc: add dcerpc_fault_to_nt_status()
...
For now this only handles fault codes with we've seen yet
and for which we have explicit torture checks.
metze
2010-04-15 09:34:03 +02:00
Stefan Metzmacher
718a804613
librpc/rpc: fix typo DERPC_ => DCERPC_
...
metze
2010-04-09 16:28:30 +02:00
Andrew Tridgell
fae84f98e3
libutil: moved the networking defines to util_net.h
...
These were causing thousands of warnings on solaris8
2010-03-26 17:36:02 +11:00
Stefan Metzmacher
77de23384d
librpc/rpc: fix dcerpc_errstr() to handle all nca_s_* status codes and fallback to WERROR codes
...
metze
2010-03-23 14:37:58 +01:00
Andrew Bartlett
9f222841fe
librpc When sending endpoint mapper requests, include the minor if_version
...
The minor version (in the upper 16 bits of syntax->if_version) needs
to be pushed as the right hand side of the endpoint mapper floor (the
same floor as the interface UUID and major if_version).
Andrew Bartlett
2010-02-20 02:55:29 +11:00
Andrew Bartlett
fd5174e88c
lib/util Split data_blob_hex_string() into upper and lower
...
Rather than have a repeat of the bugs we found at the plugfest where
hexidecimal strings must be in upper or lower case in particular
places, ensure that each caller chooses which case they want.
This reverts most of the callers back to upper case, as things were
before tridge's patch. The critical call in the extended DN code is
of course handled in lower case.
Andrew Bartlett
2009-11-12 16:34:01 +11:00
Andrew Bartlett
108b8344db
librpc Make talloc tree in binding tower match the floors
...
This is mostly cosmetics, but helped me see that these are legitimate stuctures
when viewed in the talloc tree.
Also don't put the 'ndr' structure on the long-term tree.
Andrew Bartlett
2009-10-21 22:43:55 +11:00
Andrew Tridgell
c9b0b89cc0
s4-rpc: added NDR64 support
...
This adds support for the nd464 binding string option
2009-09-17 15:19:27 -07:00
Stefan Metzmacher
7d7a9210cd
librpc: fix callers after epmapper.idl changes
...
metze
2009-08-07 11:50:23 +02:00
Volker Lendecke
f8f878285d
Add derpc_transport_string_by_transport(), apply some const
2009-01-09 23:08:16 +01:00
Volker Lendecke
9176cfe065
Fix some nonempty blank lines
2009-01-09 22:48:09 +01:00
Volker Lendecke
1d427dcee0
Add some const to dcerpc_binding_build_tower()
2009-01-06 21:57:01 +01:00
Volker Lendecke
e92b7abca0
Add a NULL check and some const to dcerpc_floor_get_lhs_data()
2009-01-06 21:25:18 +01:00
Andrew Bartlett
8e1934a384
Use new GUID_from_data_blob
...
This avoid the problem that GUID_from_string now strictly requires no
trailing data after the string-form GUID.
Andrew Bartlett
2008-11-17 10:06:27 +11:00
Günther Deschner
7f8bc6a2d9
errors: share dcerpc error function.
...
Guenther
2008-10-31 12:42:09 +01:00
Jelmer Vernooij
9f2ed1e00f
Share RPC binding string utility functions.
2008-10-12 19:05:46 +02:00