mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
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 ed49e4b1f8
)
This commit is contained in:
parent
4a40f0310c
commit
7a3aaa4041
@ -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;
|
||||
@ -944,6 +947,7 @@ struct composite_context *dcerpc_epm_map_binding_send(TALLOC_CTX *mem_ctx,
|
||||
/* basic endpoint mapping data */
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user