Stefan Metzmacher
3547872a76
s3:rpcclient: make use of dcerpc_binding_[g|s]et_*() in rpcclient.c
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:16 +01:00
Stefan Metzmacher
a1e013505c
s3:rpc_client: avoid using dcerpc_binding internals in rpc_pipe_get_tcp_port()
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:16 +01:00
Stefan Metzmacher
00073465df
s4:librpc/rpc: make use of dcerpc_binding_get_*() in dcerpc_connect.c
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:16 +01:00
Stefan Metzmacher
a281574c9f
s4:librpc/rpc: remove unused dcerpc_pipe->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
84528b9ee0
s4:libnet_become_dc: make use of 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
fd5d86aa85
s4:rpc_server/remote: make use of dcerpc_binding_get_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
e796fcd425
s4:torture/rpc: make use of dcerpc_binding_get_assoc_group_id() in handles.c
...
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
870a06aadd
s4:torture/rpc: make use of dcerpc_binding_set_*() in torture_rpc_connection_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
cef6b2d9d7
s4:librpc/rpc: make use of 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
16de18e5a2
s4:librpc/rpc: make use of dcerpc_binding_[g|s]et_* functions in dcerpc_epm_map_binding_send()
...
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
c50664f68f
s4:librpc/rpc: always call dcerpc_binding_set_abstract_syntax() in dcerpc_epm_map_binding_send()
...
We should always set the abstract syntax even if we don't ask the endpoint
mapper.
By using dcerpc_binding_set_abstract_syntax() instead of calling
binding->object = table->syntax_id, we will be able to separate
the abstract_syntax from the object uuid in future.
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
8ccebf3a27
s4:librpc/rpc: the table argument to dcerpc_epm_map_binding_send() isn't optional
...
We already dereference it unchecked later, so we can avoid some indentation.
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
aa8b2d39a2
librpc/rpc: make use of dcerpc_binding_set*() in dcerpc_binding_from_tower()
...
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
c11224225d
librpc/rpc: use dcerpc_binding_get_*() in dcerpc_default_transport_endpoint()
...
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
df4a900aa6
s4:librpc/tests: add dcerpc_binding assoc_group_id tests
...
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
06410872a1
s4:librpc/tests: add dcerpc_binding target_hostname/target_principal tests
...
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
c2e1dedb81
s4:librpc/tests: use dcerpc_binding_get*() functions
...
We should not dereference struct dcerpc_binding.
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
f2c058bf2a
librpc/rpc: avoid loosing data with dcerpc_binding_string() -> dcerpc_parse_binding()
...
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
ebc18694a1
librpc/rpc: add dcerpc_binding_[g|s]et_abstract_syntax()
...
For now this is just an alternate wrapper to
access binding->object.
Currently callers are reusing binding->object to store the
abstract syntax id instead of just the object uuid.
Some services on Windows use the same GUID for the
'object' and the 'abstract syntax', but they are completely
different things!
Most services use a null object guid, some reuse the
guid of the abstract syntax and use it like a 'class' object.
But the object guid is only really used by DCOM,
in order to call functions relative to an object instance,
which a dynamically allocated object guid.
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
43800553bb
librpc/rpc: allow "assoc_group_id" in dcerpc_binding_[g|s]et_string()
...
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
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
91a367dce5
s4:librpc/rpc: use dcerpc_binding_[g|set]_string_option("localaddress")
...
We should avoid deferencing struct dcerpc_binding if possible.
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
352d096390
s3:rpc_server: make use of dcerpc_parse_binding() to create a binding.
...
This makes sure binding is talloc'ed.
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
5e3d72e738
s3:rpcclient: make use of dcerpc_parse_binding() to create the binding
...
This makes sure the binding is talloc'ed.
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
7fd9ee632e
s4:rpc_server/spoolss: use dcerpc_parse_binding() to create the notify binding
...
This is much better than creating the binding by hand.
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
16b56d7726
s4:torture/rpc: use dcerpc_parse_binding() in epmapper.c
...
This makes sure binding is talloc'ed.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:13 +01:00
Stefan Metzmacher
05193b39de
s4:torture/rpc: use dcerpc_binding_dup() before modifying the given binding
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:13 +01:00
Stefan Metzmacher
1228a935ac
s4:librpc/rpc: use dcerpc_binding_dup() before modifying the given binding
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:13 +01:00
Stefan Metzmacher
6a193326d5
s4:libnet: avoid compiler warnings in libnet_lookup.c
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:13 +01:00
Stefan Metzmacher
dfd30a6b28
s4:rpc_server/remote: avoid compiler a compiler warning
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:13 +01:00
Stefan Metzmacher
da481b5906
s4:wrepl_server: avoid some compiler warnings
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:13 +01:00
Stefan Metzmacher
b51cc6ea37
s4:torture/rpc: s/pipe/p/ in order to avoid compiler warnings
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:13 +01:00