s4:librpc/rpc: don't create a ncacn_np: binding
authorStefan Metzmacher <metze@samba.org>
Wed, 12 Feb 2014 09:48:52 +0000 (10:48 +0100)
committerGünther Deschner <gd@samba.org>
Thu, 13 Feb 2014 10:54:18 +0000 (11:54 +0100)
It's up to the caller to store the dcerpc_pipe->binding.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
source4/librpc/rpc/dcerpc_connect.c

index 3bd6eafabb2c09767b0140ce2068fd7005d50d9b..c903e25f63e7b6650942eea40508bde8047fdec1 100644 (file)
@@ -101,19 +101,6 @@ static void continue_smb_connect(struct composite_context *ctx)
        smb1cli_tcon_set_id(tcon, t->tid);
        timeout_msec = t->session->transport->options.request_timeout * 1000;
 
-       /* if we don't have a binding on this pipe yet, then create one */
-       if (s->io.pipe->binding == NULL) {
-               const char *r = smbXcli_conn_remote_name(conn);
-               char *str;
-               SMB_ASSERT(r != NULL);
-               str = talloc_asprintf(s, "ncacn_np:%s", r);
-               if (composite_nomem(str, c)) return;
-               c->status = dcerpc_parse_binding(s->io.pipe, str,
-                                                &s->io.pipe->binding);
-               talloc_free(str);
-               if (!composite_is_ok(c)) return;
-       }
-
        /* send named pipe open request */
        open_ctx = dcerpc_pipe_open_smb_send(s->io.pipe->conn,
                                             conn, session,
@@ -258,19 +245,6 @@ static void continue_smb2_connect(struct tevent_req *subreq)
        tcon = t->smbXcli;
        timeout_msec = t->session->transport->options.request_timeout * 1000;
 
-       /* if we don't have a binding on this pipe yet, then create one */
-       if (s->io.pipe->binding == NULL) {
-               const char *r = smbXcli_conn_remote_name(conn);
-               char *str;
-               SMB_ASSERT(r != NULL);
-               str = talloc_asprintf(s, "ncacn_np:%s", r);
-               if (composite_nomem(str, c)) return;
-               c->status = dcerpc_parse_binding(s->io.pipe, str,
-                                                &s->io.pipe->binding);
-               talloc_free(str);
-               if (!composite_is_ok(c)) return;
-       }
-
        /* send named pipe open request */
        open_req = dcerpc_pipe_open_smb_send(s->io.pipe->conn,
                                             conn, session,