summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-12-22 19:38:32 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:29:41 -0500
commit7a3aaa40416169d055d7cb7b93d577edc19a1fef (patch)
tree05c4709884dd0c770e15c7c2a8dbd12f7c01943c /source4/librpc
parent4a40f0310c5a3c375874ef42f12a5c434994f8e9 (diff)
downloadsamba-7a3aaa40416169d055d7cb7b93d577edc19a1fef.tar.gz
samba-7a3aaa40416169d055d7cb7b93d577edc19a1fef.tar.bz2
samba-7a3aaa40416169d055d7cb7b93d577edc19a1fef.zip
r20326: always set the binding->target_hostname!
we crashed before trying ncacn_np: for frsrpc as frsrpc doesn't have a ncacn_np endpoint listed in the idl header and the endpoint mapping code was trying our smbcli lib with a NULL target_hostname -> called_name metze (This used to be commit ed49e4b1f87db483768dec36732b0c9765d1d4bc)
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/rpc/dcerpc_util.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c
index bedecee2b9..74981d6dce 100644
--- a/source4/librpc/rpc/dcerpc_util.c
+++ b/source4/librpc/rpc/dcerpc_util.c
@@ -648,6 +648,7 @@ NTSTATUS dcerpc_binding_from_tower(TALLOC_CTX *mem_ctx, struct epm_tower *tower,
ZERO_STRUCT(binding->object);
binding->options = NULL;
binding->host = NULL;
+ binding->target_hostname = NULL;
binding->flags = 0;
binding->transport = dcerpc_transport_by_tower(tower);
@@ -682,6 +683,8 @@ NTSTATUS dcerpc_binding_from_tower(TALLOC_CTX *mem_ctx, struct epm_tower *tower,
/* Set network address */
if (tower->num_floors >= 5) {
binding->host = dcerpc_floor_get_rhs_data(mem_ctx, &tower->floors[4]);
+ NT_STATUS_HAVE_NO_MEMORY(binding->host);
+ binding->target_hostname = binding->host;
}
*b_out = binding;
return NT_STATUS_OK;
@@ -942,11 +945,12 @@ struct composite_context *dcerpc_epm_map_binding_send(TALLOC_CTX *mem_ctx,
if (composite_nomem(epmapper_binding, c)) return c;
/* basic endpoint mapping data */
- epmapper_binding->transport = binding->transport;
- epmapper_binding->host = talloc_reference(epmapper_binding, binding->host);
- epmapper_binding->options = NULL;
- epmapper_binding->flags = 0;
- epmapper_binding->endpoint = NULL;
+ epmapper_binding->transport = binding->transport;
+ epmapper_binding->host = talloc_reference(epmapper_binding, binding->host);
+ epmapper_binding->target_hostname = epmapper_binding->host;
+ epmapper_binding->options = NULL;
+ epmapper_binding->flags = 0;
+ epmapper_binding->endpoint = NULL;
/* initiate rpc pipe connection */
pipe_connect_req = dcerpc_pipe_connect_b_send(c, epmapper_binding, &dcerpc_table_epmapper,