diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-12-18 14:54:57 +0000 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-12-18 14:54:57 +0000 |
commit | d14c8604653d39dd25736279d34930ee7a3ae103 (patch) | |
tree | 626f700b9b42b798ed7459a5cba5cd27aca9753e /source4/librpc/rpc/dcerpc_secondary.c | |
parent | 0c0b9c738f0fc1bf8aa64533a5e4e0635b84f58f (diff) | |
parent | fc31f2c5269fd405be96b9a036baf35a60141ccf (diff) | |
download | samba-d14c8604653d39dd25736279d34930ee7a3ae103.tar.gz samba-d14c8604653d39dd25736279d34930ee7a3ae103.tar.bz2 samba-d14c8604653d39dd25736279d34930ee7a3ae103.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba into pyregistry
Diffstat (limited to 'source4/librpc/rpc/dcerpc_secondary.c')
-rw-r--r-- | source4/librpc/rpc/dcerpc_secondary.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/source4/librpc/rpc/dcerpc_secondary.c b/source4/librpc/rpc/dcerpc_secondary.c index 8ac235c67c..1d76c65f40 100644 --- a/source4/librpc/rpc/dcerpc_secondary.c +++ b/source4/librpc/rpc/dcerpc_secondary.c @@ -31,13 +31,14 @@ #include "auth/credentials/credentials.h" #include "param/param.h" #include "libcli/resolve/resolve.h" - +#include "lib/socket/socket.h" struct sec_conn_state { struct dcerpc_pipe *pipe; struct dcerpc_pipe *pipe2; struct dcerpc_binding *binding; struct smbcli_tree *tree; + struct socket_address *peer_addr; }; @@ -94,11 +95,17 @@ _PUBLIC_ struct composite_context* dcerpc_secondary_connection_send(struct dcerp return c; case NCACN_IP_TCP: + s->peer_addr = dcerpc_socket_peer_addr(s->pipe->conn, s); + if (!s->peer_addr) { + composite_error(c, NT_STATUS_INVALID_PARAMETER); + return c; + } + pipe_tcp_req = dcerpc_pipe_open_tcp_send(s->pipe2->conn, - s->binding->host, + s->peer_addr->addr, s->binding->target_hostname, atoi(s->binding->endpoint), - dcerpc_resolve_ctx(s->pipe->conn)); + resolve_context_init(s)); composite_continue(c, pipe_tcp_req, continue_open_tcp, c); return c; |