s3-rpc_server: Remove obsolete make_internal_rpc_pipe().
authorAndreas Schneider <asn@samba.org>
Thu, 24 Oct 2013 08:32:17 +0000 (10:32 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 29 Oct 2013 15:29:16 +0000 (16:29 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/rpc_server/rpc_ncacn_np.c
source3/rpc_server/rpc_ncacn_np.h

index 92a724b982fb77d04446555787722a7ceef42368..5317fd3db3371d066b1aa9a9f25de900e145588a 100644 (file)
@@ -177,88 +177,6 @@ out:
        return status;
 }
 
-NTSTATUS make_internal_rpc_pipe(TALLOC_CTX *mem_ctx,
-                               struct messaging_context *msg_ctx,
-                               const char *pipe_name,
-                               const struct ndr_syntax_id *syntax,
-                               const struct tsocket_address *remote_address,
-                               const struct auth_session_info *session_info,
-                               struct npa_state **pnpa)
-{
-       TALLOC_CTX *tmp_ctx = talloc_stackframe();
-       struct pipe_rpc_fns *context_fns;
-       struct pipes_struct *p = NULL;
-       struct npa_state *npa;
-       NTSTATUS status;
-       int rc;
-       bool ok;
-
-       DEBUG(4, ("Create of internal pipe %s requested\n", pipe_name));
-
-       npa = npa_state_init(tmp_ctx);
-       if (npa == NULL) {
-               status = NT_STATUS_NO_MEMORY;
-               goto out;
-       }
-
-       /* Create a basic pipes struct */
-       rc = make_base_pipes_struct(npa,
-                                   msg_ctx,
-                                   pipe_name,
-                                   NCACN_NP,
-                                   RPC_LITTLE_ENDIAN,
-                                   false,
-                                   remote_address,
-                                   NULL,
-                                   &p);
-       if (rc != 0) {
-               status = NT_STATUS_NO_MEMORY;
-               DEBUG(0,("ERROR! No memory to create pipes_struct!\n"));
-               goto out;
-       }
-       npa->private_data = (void *)p;
-
-       ok = init_pipe_handles(p, syntax);
-       if (!ok) {
-               DEBUG(0, ("init_pipe_handles failed.\n"));
-               status = NT_STATUS_NO_MEMORY;
-               goto out;
-       }
-
-       p->session_info = copy_session_info(p, session_info);
-       if (p->session_info == NULL) {
-               DEBUG(0, ("Duplicating the session_info failed\n"));
-               status = NT_STATUS_NO_MEMORY;
-               goto out;
-       }
-
-       context_fns = talloc(p, struct pipe_rpc_fns);
-       if (context_fns == NULL) {
-               DEBUG(0,("Failed to allocate the context functions structure!\n"));
-               status = NT_STATUS_NO_MEMORY;
-               goto out;
-       }
-
-       context_fns->next = context_fns->prev = NULL;
-       context_fns->n_cmds = rpc_srv_get_pipe_num_cmds(syntax);
-       context_fns->cmds = rpc_srv_get_pipe_cmds(syntax);
-       context_fns->context_id = 0;
-       context_fns->syntax = *syntax;
-
-       /* add to the list of open contexts */
-       DLIST_ADD(p->contexts, context_fns);
-
-       *pnpa = talloc_steal(mem_ctx, npa);
-       status = NT_STATUS_OK;
-out:
-       if (!NT_STATUS_IS_OK(status) && p != NULL) {
-               close_policy_by_pipe(p);
-       }
-
-       talloc_free(tmp_ctx);
-       return status;
-}
-
 /****************************************************************************
  Make an internal namedpipes structure
 ****************************************************************************/
index 07a2c15a63eb2918fcf52d443730fe5251a74ff3..b8426e07ac6f0ccc1d903ab951e824eaec378a82 100644 (file)
@@ -44,14 +44,6 @@ NTSTATUS make_external_rpc_pipe(TALLOC_CTX *mem_ctx,
                                const struct auth_session_info *session_info,
                                struct npa_state **pnpa);
 
-NTSTATUS make_internal_rpc_pipe(TALLOC_CTX *mem_ctx,
-                               struct messaging_context *msg_ctx,
-                               const char *pipe_name,
-                               const struct ndr_syntax_id *syntax,
-                               const struct tsocket_address *remote_address,
-                               const struct auth_session_info *session_info,
-                               struct npa_state **pnpa);
-
 NTSTATUS make_internal_rpc_pipe_socketpair(TALLOC_CTX *mem_ctx,
                                           struct tevent_context *ev_ctx,
                                           struct messaging_context *msg_ctx,