From cd8f811247038c057653995f06aacd8b6cebc0a4 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 24 Oct 2013 10:32:17 +0200 Subject: [PATCH] s3-rpc_server: Remove obsolete make_internal_rpc_pipe(). Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher --- source3/rpc_server/rpc_ncacn_np.c | 82 --------------------------------------- source3/rpc_server/rpc_ncacn_np.h | 8 ---- 2 files changed, 90 deletions(-) diff --git a/source3/rpc_server/rpc_ncacn_np.c b/source3/rpc_server/rpc_ncacn_np.c index 92a724b982f..5317fd3db33 100644 --- a/source3/rpc_server/rpc_ncacn_np.c +++ b/source3/rpc_server/rpc_ncacn_np.c @@ -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 ****************************************************************************/ diff --git a/source3/rpc_server/rpc_ncacn_np.h b/source3/rpc_server/rpc_ncacn_np.h index 07a2c15a63e..b8426e07ac6 100644 --- a/source3/rpc_server/rpc_ncacn_np.h +++ b/source3/rpc_server/rpc_ncacn_np.h @@ -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, -- 2.11.4.GIT