diff options
author | Simo Sorce <idra@samba.org> | 2011-05-11 16:38:46 -0400 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2011-05-13 14:40:26 +0200 |
commit | d31181214cee1ce459b58f0ca60b40a38f396dac (patch) | |
tree | 228d384947426338f9978d58cd344373f571f4b5 /source3/rpc_server | |
parent | 99df3f6cbbdfa1693d805c2696e34f353dfa28ac (diff) | |
download | samba-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')
-rw-r--r-- | source3/rpc_server/rpc_ncacn_np.c | 53 | ||||
-rw-r--r-- | source3/rpc_server/rpc_ncacn_np.h | 6 |
2 files changed, 31 insertions, 28 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, diff --git a/source3/rpc_server/rpc_ncacn_np.h b/source3/rpc_server/rpc_ncacn_np.h index edebceaa43..3d9a170cdc 100644 --- a/source3/rpc_server/rpc_ncacn_np.h +++ b/source3/rpc_server/rpc_ncacn_np.h @@ -49,12 +49,6 @@ NTSTATUS rpcint_binding_handle(TALLOC_CTX *mem_ctx, const struct auth_serversupplied_info *session_info, struct messaging_context *msg_ctx, struct dcerpc_binding_handle **binding_handle); -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, - struct messaging_context *msg_ctx, - struct rpc_pipe_client **presult); NTSTATUS rpc_pipe_open_interface(TALLOC_CTX *mem_ctx, const struct ndr_syntax_id *syntax, const struct auth_serversupplied_info *session_info, |