summaryrefslogtreecommitdiff
path: root/source3/rpc_server/rpc_ncacn_np.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2011-05-11 16:38:46 -0400
committerGünther Deschner <gd@samba.org>2011-05-13 14:40:26 +0200
commitd31181214cee1ce459b58f0ca60b40a38f396dac (patch)
tree228d384947426338f9978d58cd344373f571f4b5 /source3/rpc_server/rpc_ncacn_np.c
parent99df3f6cbbdfa1693d805c2696e34f353dfa28ac (diff)
downloadsamba-d31181214cee1ce459b58f0ca60b40a38f396dac.tar.gz
samba-d31181214cee1ce459b58f0ca60b40a38f396dac.tar.bz2
samba-d31181214cee1ce459b58f0ca60b40a38f396dac.zip
rpc_server: Always use rpc_pipe_open_interface()
This way we can configure which rpc service we actually want to connect to. By default it uses an "embedded" interface and calls rpc_pipe_open_internal() Signed-off-by: Günther Deschner <gd@samba.org> Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Fri May 13 14:40:26 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/rpc_server/rpc_ncacn_np.c')
-rw-r--r--source3/rpc_server/rpc_ncacn_np.c53
1 files changed, 31 insertions, 22 deletions
diff --git a/source3/rpc_server/rpc_ncacn_np.c b/source3/rpc_server/rpc_ncacn_np.c
index 2e99da72ed..9328322f20 100644
--- a/source3/rpc_server/rpc_ncacn_np.c
+++ b/source3/rpc_server/rpc_ncacn_np.c
@@ -519,7 +519,8 @@ NTSTATUS rpcint_binding_handle(TALLOC_CTX *mem_ctx,
* @brief Create a new RPC client context which uses a local transport.
*
* This creates a local transport. It is a shortcut to directly call the server
- * functions and avoid marschalling.
+ * functions and avoid marshalling.
+ * NOTE: this function should be used only by rpc_pipe_open_interface()
*
* @param[in] mem_ctx The memory context to use.
*
@@ -536,19 +537,8 @@ NTSTATUS rpcint_binding_handle(TALLOC_CTX *mem_ctx,
*
* @return NT_STATUS_OK on success, a corresponding NT status if an
* error occured.
- *
- * @code
- * struct rpc_pipe_client *winreg_pipe;
- * NTSTATUS status;
- *
- * status = rpc_pipe_open_internal(tmp_ctx,
- * &ndr_table_winreg.syntax_id,
- * p->session_info,
- * client_id,
- * &winreg_pipe);
- * @endcode
*/
-NTSTATUS rpc_pipe_open_internal(TALLOC_CTX *mem_ctx,
+static NTSTATUS rpc_pipe_open_internal(TALLOC_CTX *mem_ctx,
const struct ndr_syntax_id *abstract_syntax,
const struct auth_serversupplied_info *serversupplied_info,
struct client_address *client_id,
@@ -833,17 +823,36 @@ done:
}
/**
- * @brief Create a new RPC client context which uses a local dispatch function.
+ * @brief Create a new RPC client context which uses a local dispatch function
+ * or a remote transport, depending on rpc_server configuration for the
+ * specific service.
+ *
+ * @param[in] mem_ctx The memory context to use.
+ *
+ * @param[in] abstract_syntax Normally the syntax_id of the autogenerated
+ * ndr_table_<name>.
+ *
+ * @param[in] serversupplied_info The server supplied authentication function.
*
- * @param mem_ctx The memory context on which thje pipe will ultimately
- * be allocated
- * @param name The pipe name to connect to.
- * @param session_info Credentials to use for the connection.
- * @param pipe [in|out] Checks if a pipe is connected, and connects it
- * if not
+ * @param[in] client_id The client address information.
+ *
+ * @param[in] msg_ctx The messaging context to use.
*
- * @return NT_STATUS_OK on success, a corresponding NT status if
- * an error occured.
+ * @param[out] presult A pointer to store the connected rpc client pipe.
+ *
+ * @return NT_STATUS_OK on success, a corresponding NT status if an
+ * error occured.
+ *
+ * @code
+ * struct rpc_pipe_client *winreg_pipe;
+ * NTSTATUS status;
+ *
+ * status = rpc_pipe_open_interface(tmp_ctx,
+ * &ndr_table_winreg.syntax_id,
+ * p->session_info,
+ * client_id,
+ * &winreg_pipe);
+ * @endcode
*/
NTSTATUS rpc_pipe_open_interface(TALLOC_CTX *mem_ctx,