summaryrefslogtreecommitdiff
path: root/source3/lib/netapi/cm.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/netapi/cm.c')
-rw-r--r--source3/lib/netapi/cm.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/source3/lib/netapi/cm.c b/source3/lib/netapi/cm.c
index 0b8220675d..290194ba2d 100644
--- a/source3/lib/netapi/cm.c
+++ b/source3/lib/netapi/cm.c
@@ -253,3 +253,26 @@ WERROR libnetapi_open_pipe(struct libnetapi_ctx *ctx,
return WERR_OK;
}
+
+/********************************************************************
+********************************************************************/
+
+WERROR libnetapi_get_binding_handle(struct libnetapi_ctx *ctx,
+ const char *server_name,
+ const struct ndr_syntax_id *interface,
+ struct dcerpc_binding_handle **binding_handle)
+{
+ struct rpc_pipe_client *pipe_cli;
+ WERROR result;
+
+ *binding_handle = NULL;
+
+ result = libnetapi_open_pipe(ctx, server_name, interface, &pipe_cli);
+ if (!W_ERROR_IS_OK(result)) {
+ return result;
+ }
+
+ *binding_handle = pipe_cli->binding_handle;
+
+ return WERR_OK;
+}