diff options
author | Stefan Metzmacher <metze@samba.org> | 2017-07-20 23:05:53 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2017-08-07 15:20:02 +0200 |
commit | 8d36bbe1874f47230d663e16de3c8e0e0800d997 (patch) | |
tree | 20c4a7ed2697e4f96ea2dd8b0a99facb4a39c2bf /source4/librpc | |
parent | a6ae9da98dff49e37e23481e8932eb18c8e45c02 (diff) | |
download | samba-8d36bbe1874f47230d663e16de3c8e0e0800d997.tar.gz |
s4:librpc/rpc: remember the target_hostname on ncacn_http connections
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source4/librpc')
-rw-r--r-- | source4/librpc/rpc/dcerpc_connect.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/librpc/rpc/dcerpc_connect.c b/source4/librpc/rpc/dcerpc_connect.c index 8ed12578e21..bec7022f4d2 100644 --- a/source4/librpc/rpc/dcerpc_connect.c +++ b/source4/librpc/rpc/dcerpc_connect.c @@ -422,6 +422,7 @@ static NTSTATUS dcerpc_pipe_connect_ncacn_ip_tcp_recv(struct composite_context * struct pipe_http_state { struct dcerpc_pipe_connect io; const char *localaddr; + const char *target_hostname; const char *rpc_server; uint32_t rpc_server_port; char *rpc_proxy; @@ -457,6 +458,8 @@ static void continue_pipe_open_ncacn_http(struct tevent_req *subreq) s->io.conn->transport.stream = stream; s->io.conn->transport.write_queue = queue; s->io.conn->transport.pending_reads = 0; + s->io.conn->server_name = strupper_talloc(s->io.conn, + s->target_hostname); composite_done(c); } @@ -493,6 +496,8 @@ static struct composite_context* dcerpc_pipe_connect_ncacn_http_send( "localaddress"); /* RPC server and port (the endpoint) */ s->rpc_server = dcerpc_binding_get_string_option(io->binding, "host"); + s->target_hostname = dcerpc_binding_get_string_option(io->binding, + "target_hostname"); endpoint = dcerpc_binding_get_string_option(io->binding, "endpoint"); if (endpoint == NULL) { composite_error(c, NT_STATUS_INVALID_PARAMETER_MIX); |