1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

52 Commits

Author SHA1 Message Date
Stefan Metzmacher
5ba5430538 librpc/rpc: add dcerpc_binding_[g|s]et_assoc_group_id()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:15 +01:00
Stefan Metzmacher
6ce8d761dc librpc/rpc: add dcerpc_binding_[g|s]et_transport()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:15 +01:00
Stefan Metzmacher
f066bd7b33 librpc/rpc: add dcerpc_binding_[g|s]et_object()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:15 +01:00
Stefan Metzmacher
8dac96728a librpc/rpc: add dcerpc_binding_[g|s]et_flags()
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
77d0098984 librpc/rpc: add dcerpc_binding_get_auth_info()
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
9f5a59eb53 librpc/rpc: simplify dcerpc_parse_binding()
We now make a copy of the given string, so that we can mark chunks
inline. Then we call dcerpc_binding_set_string_option() in order
to set the elements.

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
ed8adc2920 librpc/rpc: handle ncacn_options 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
017338a180 librpc/rpc: set more things via 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
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
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
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
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
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
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
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
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
Jelmer Vernooij
f9ca9e46ad Finish removal of iconv_convenience in public API's. 2010-05-18 11:45: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
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