diff options
author | Rafal Szczesniak <mimir@samba.org> | 2005-12-09 00:04:38 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:47:12 -0500 |
commit | 38b0dde1148a55040f9c1948a510ee67273f8a49 (patch) | |
tree | 130fa69aee47c421265e75b642d230d8aa2380b1 /source4/librpc/rpc/dcerpc_util.c | |
parent | 6f33cdbc2a600f72f5c95f1bc292e0afa096b073 (diff) | |
download | samba-38b0dde1148a55040f9c1948a510ee67273f8a49.tar.gz samba-38b0dde1148a55040f9c1948a510ee67273f8a49.tar.bz2 samba-38b0dde1148a55040f9c1948a510ee67273f8a49.zip |
r12135: Move named pipe connect on smb2 function to async implementation.
Completely untested, it's a bit difficult without having vista
around (yet), so - Andrew, please test it and let me know what's
wrong.
rafal
(This used to be commit b9e7522bd4b626402c51a69695bea0928f5baef7)
Diffstat (limited to 'source4/librpc/rpc/dcerpc_util.c')
-rw-r--r-- | source4/librpc/rpc/dcerpc_util.c | 46 |
1 files changed, 3 insertions, 43 deletions
diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c index 732eade694..72975461d0 100644 --- a/source4/librpc/rpc/dcerpc_util.c +++ b/source4/librpc/rpc/dcerpc_util.c @@ -1016,59 +1016,19 @@ NTSTATUS dcerpc_pipe_auth(struct dcerpc_pipe *p, } -/* open a rpc connection to a rpc pipe on SMB2 using the binding - structure to determine the endpoint and options */ -static NTSTATUS dcerpc_pipe_connect_ncacn_np_smb2(TALLOC_CTX *tmp_ctx, - struct dcerpc_pipe *p, - struct dcerpc_binding *binding, - const char *pipe_uuid, - uint32_t pipe_version, - struct cli_credentials *credentials) -{ - NTSTATUS status; - struct smb2_tree *tree; - const char *pipe_name = NULL; - - if (binding->flags & DCERPC_SCHANNEL) { - credentials = cli_credentials_init(tmp_ctx); - cli_credentials_set_anonymous(credentials); - cli_credentials_guess(credentials); - } - status = smb2_connect(tmp_ctx, binding->host, "IPC$", credentials, &tree, - p->conn->event_ctx); - if (!NT_STATUS_IS_OK(status)) { - DEBUG(0,("Failed to connect to %s - %s\n", - binding->host, nt_errstr(status))); - return status; - } - - pipe_name = binding->endpoint; - - status = dcerpc_pipe_open_smb2(p->conn, tree, pipe_name); - if (!NT_STATUS_IS_OK(status)) { - DEBUG(0,("Failed to open pipe %s - %s\n", pipe_name, nt_errstr(status))); - return status; - } - - talloc_steal(p->conn, tree); - - return NT_STATUS_OK; -} - - /* open a rpc connection to a rpc pipe on SMB using the binding structure to determine the endpoint and options */ static NTSTATUS dcerpc_pipe_connect_ncacn_np(TALLOC_CTX *tmp_ctx, struct dcerpc_pipe_connect *io) { if (io->binding->flags & DCERPC_SMB2) { - return dcerpc_pipe_connect_ncacn_np_smb2(tmp_ctx, io->pipe, io->binding, - io->pipe_uuid, io->pipe_version, - io->creds); + return dcerpc_pipe_connect_ncacn_np_smb2(tmp_ctx, io); + } return dcerpc_pipe_connect_ncacn_np_smb(tmp_ctx, io); } + /* open a rpc connection to a rpc pipe on SMP using the binding structure to determine the endpoint and options */ static NTSTATUS dcerpc_pipe_connect_ncalrpc(TALLOC_CTX *tmp_ctx, |